uninstalling programs

Greg Hamilton yellowdog-general@lists.terrasoftsolutions.com
Wed Mar 24 16:41:01 2004


> Unfortunately, there are problems with "sudo." First, inexplicably, 
> "sudo" is not enabled in Yellow Dog Linux out-of-the-box. Therefore, 
> [a] one must login as root using "su" at least once to enable "sudo" 
> by editing a file using "visudo," and [b] one must *know* that one 
> must manually enable "sudo." That second issue is often the largest 
> barrier to the use of "sudo." Certainly, "sudo" is not mentioned 
> anywhere useful on Yellow Dog's Web site, though a search yields the 
> following page in connection with ADSL administration:

sudo is enabled by default, there just aren't any users in the sudoers 
file. You are quite correct in saying that a barrier to it's use is 
knowing that it exists and knowing how to configure it. A bit easier in 
OS X where the first user account created has 'Admin' rights ie. 
they're in the sudoers file and can create new accounts and bestow 
admin rights on other accounts.

sudo is much more interesting than it might first appear. It doesn't 
just allow you to run individual commands as root, you can configure it 
to allow specific users to run specific commands as other users with or 
without password authentication.

> <http://www.yellowdoglinux.com/support/solutions/ydl_general/yum.shtml>
>
> Second, in my experience, "sudo" *fails* inexplicably in some 
> circumstances. This may be some weirdness in my setup. For instance, 
> "sudo" usually (though not always) fails for me when used in 
> conjunction with the "mount" command. This is frustrating because I 
> get the nasty message "You must be root to do that!" then it *reveals* 
> my user password in clear text. I find this so disconcerting that I 
> have reverted to using "su -" and performing all my chores as root.

I've never seen or heard of this before. Something is seriously borken 
there.

Without sudo:

$ mount -t hfsplus -o ro /dev/hda9 /mnt/macos
mount: only root can do that

With sudo:

$ sudo mount -t hfsplus -o ro /dev/hda9 /mnt/macos
Password: <password entered here but not displayed>

The message 'mount: only root can do that' comes from mount. If you see 
it when you're using sudo then either you've totally mistyped the 
command and sudo is acting on some other command or you've really 
messed up your sudo config and sudo is not trying to execute the 
command as root.

One way or the other sudo doesn't, to the best of my knowledge, ever 
display your password.

I have a really simple sudo config. If you are a member of the wheel 
group you can do anything using sudo.

%wheel	ALL=(ALL)	ALL

And in /etc/group

wheel:x:10:root,<comma separated list of users who can sudo>

Works a treat.