On Sun, Feb 25, 2007 at 07:20:08PM +0000, Eur Ing Chris Green wrote:
On Sun, Feb 25, 2007 at 07:12:42PM +0000, Rob Page wrote:
On 25/02/07, Eur Ing Chris Green cl@isbd.net wrote:
I virtually never use sudo as I simply su to root and do what's needed.
However I want to do a mount in a shell script that runs as me rather than root and the safest way to do it would seem to be to all 'me' to sudo a mount command. However I can't get it to work with no password, what I have in the sudoers file is:-
chris home = NOPASSWD: /sbin/mount chris home = NOPASSWD: /sbin/umount
... but it's still prompting me for a password when I do 'sudo mount //bla/bla bla'. So, what am I doing wrong?
Hi Chris,
My sudo line is:
rob ALL = ALL, NOPASSWD: /opt/xfce4/libexec/xfsm-shutdown-helper
which prompts me for a password, except when running xfsm-shutdown-helper.
As I recall when trying to set this up to work right, the order of the commands is quite important. I'm guessing you've got a chris ALL = ALL line somewhere in the file.
No, the only other line in the file is the default:-
root ALL=(ALL) ALL
As I said I don't generally see the point of sudo for command line use, just become root and do what you need to do, with a prompt that flags you that you are root you shouldn't forget. (It's maybe a heritage of having to do it this way in the past so I am very wary when I am root)
Aaarrrggghhh!!
I'm being very silly. The password prompt when I do:-
sudo smbmount //chris/C xp
is the password for mounting the XP file system (i.e. the XP password) not one from sudo!
Sorry for the noise folks.