Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After removing the vim-minimal package, because it was conflicting with the GUI Vim I was trying to install, sudo has disappeared, and su is giving an authentication failure.

[portOdin@localhost ~]$ su
Password: 
su: Authentication failure

[portOdin@localhost ~]$ sudo
bash: sudo: command not found...

I tried with zsh as well, and also created a new user, though had the same problems.

If I could get su working, or if there is some alternative, I could reinstall with sudo yum install sudo. I'm using Fedora 20.

share|improve this question
1  
Try giving su - . –  Ramesh Aug 28 at 1:45
    
Related: unix.stackexchange.com/questions/119310/… –  slm Aug 28 at 2:35
    
Try gksu if that command is available –  SHW Aug 28 at 6:58
    
@SHW - unfortunately gksu is not included on Red Hat based distros. Don't ask me why, seems like it should be but it just isn't. –  slm Aug 28 at 13:55
    
Remember that su wants the root password, not your own password like sudo uses. –  Barmar Sep 3 at 20:07

2 Answers 2

Removing vim-minimal was a mistake. If you intend to make use of sudo you have to have that package installed on Fedora. You can tell that sudo requires it like so:

$ rpm -q --requires sudo | grep vim
vim-minimal

I'd suggest putting it back, and working around whatever the other issue actually was with vim. Fedora has always had excellent support when it came to all the varieties of vim and having them installed together.

I'm using F19 and F20 and they both have pretty much all the Vim's installed simultaneously without issues.

$ yum list installed | grep vim | expand
vim-X11.x86_64                         2:7.4.179-1.fc19                @updates 
vim-common.x86_64                      2:7.4.179-1.fc19                @updates 
vim-enhanced.x86_64                    2:7.4.179-1.fc19                @updates 
vim-filesystem.x86_64                  2:7.4.179-1.fc19                @updates 
vim-minimal.x86_64                     2:7.4.179-1.fc19                @updates 
vim-vimoutliner.noarch                 0.3.7-3.fc19                    @updates 

If you know the password to the root account on your system it's a simple run of this:

$ su -

You're now root and you can re-install sudo.

$ yum install -y sudo

But I really want vim-minimal gone

If you're convinced that you want vim-minimal removed you can do so using rpm in a more surgical way like so:

$ rpm -e --no-deps vim-minimal

This will remove vim-minimal but leave anything that depends on it left intact on the system. This would include sudo, which should still be able to function, even with vim-minimal absent.

References

share|improve this answer
    
su - did not work. Not sure why, but it gave me the same authentication error. I'll try reinstalling vim-minimal though. Thanks for the advice. –  portOdin Aug 28 at 2:53
1  
If su - didn't work then you're probably using the incorrect password for the root user. –  slm Aug 28 at 2:55
up vote 2 down vote accepted

Ok, if anyone ends up in a similar situation, you can use pkexec yum install sudo. pkexec will let you enter your password in your OS's GUI.

  pkexec allows an authorized user to execute PROGRAM as another user. If
  username is not specified, then the program will be executed as the
  administrative super user, root.

This helped: http://askubuntu.com/questions/434525/can-sudo-be-reinstalled-after-being-removed

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.