Su or sudo don't work on fedora 28

I upgraded from Fedora 27 to 28 and I am no longer able to run sudo or su from command line, I was able to do so before upgrade, verified that my user is still part of wheel group, have tried googling for it a while but havent found any solution to this problem, any troubleshooting advice is highly appreciated

odd thing is , I cant even su to the same user with which I have logged in !,

[girish@girish ~]$ su - girish
Password: 
su: Authentication failure

thanks

The only possibility I can think of is that, the user you are trying to login to, has set disabled (1) somewhere in update process!
You may want to set a (new) password for it.
For instanc $ passwd root will ask you for a new password for the root user.
If it went the expected way (i.e. you could login to root user by the new password you just set) then there shouldn’t be any problem for the rest…

(1): same as the sate of root user in later versions of Fedora

Open another terminal window and run journalctl -f in there. Then attempt su to your own user again and watch what gets written in the other terminal. The journalctl output should give you more insight on what might be wrong. You can hit Ctrl-C to stop the journalctl output.

2 Likes

thanks !, that showed following ,

May 25 20:57:58 girish su[26276]: pam_unix(su-l:auth): authentication failure; logname= uid=1000 euid=0 tty=pts/0 ruser=root rhost= user=girish
May 25 20:57:58 girish audit[26276]: USER_AUTH pid=26276 uid=1000 auid=0 ses=5 msg=‘op=PAM:authentication grantors=? acct=“girish” exe="/usr/bin/su" hostname=girish addr=? terminal=pts/0 res=failed’
May 25 20:58:00 girish su[26276]: FAILED SU (to girish) root on pts/0

any suggestions what could be wrong?

Thanks, I have tried resetting the password for my user as root but no luck !

su or su -c ‘…’ is disabled with F29, I guess.
very inconvenient, indeed.
breaks all my scripts with su -c …

if you need to do root tasks use sudo -s

thanks , I am facing same problem for sudo too , the user is already part of wheel group , when I am prompted for password, it fails password validation,

[girish@girish ~]$ sudo -s ls
[sudo] password for girish: 
Sorry, try again.
[sudo] password for girish: 
Sorry, try again.
[sudo] password for girish: 
sudo: 2 incorrect password attempts

After I upgraded to Fedora 29, the problem is gone ! , thanks all for your answers

1 Like

Hello @girishbaxi. Welcome to the community! Please do take a few minutes to go over the introductory posts in #start-here when you have the time. They contain lots of useful information.

Your issue was pretty strange, like its resolution :slight_smile:
BTW it’s even better that you upgraded to Fedora 29, since Fedora 28 will be EOL very soon.

1 Like

Ah! If sudo was not working, how did you performed the upgrade? Using gnome software?

this won’t work this way.

  1. first typ: sudo -s and then the Enter key
  2. it will ask the password
  3. and then typ your command e.g. dnf install …