Hi Folks,
I've read up on sudoers but I'm obviously doing something wrong.
When I thought this was working, it was apparently fooling me and working off a previously entered sudo password ... so it obviously isn't working!
Aim - to enable a script to use the mount and umount commands without needing a password entered.
Sudo file...
...noting that between the "michelle" and the "ALL" I have tried a space and a tab, neither work.
Any ideas please?
I have also tried listing the commands specifically, like this...
..but that didn't work either.
A "whoami" at the start of the script confirms it is running as, "michelle."
I've read up on sudoers but I'm obviously doing something wrong.
When I thought this was working, it was apparently fooling me and working off a previously entered sudo password ... so it obviously isn't working!
Aim - to enable a script to use the mount and umount commands without needing a password entered.
Sudo file...
Code:
Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification Cmnd_Alias CMD_LIST = /bin/mount, /bin/umount # User privilege specification root ALL=(ALL) ALL michelle ALL=(ALL) NOPASSWD: CMD_LIST # Uncomment to allow members of group sudo to not need a password # (Note that later entries override this, so you might need to move # it further down) # %sudo ALL=NOPASSWD: ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL
Any ideas please?
I have also tried listing the commands specifically, like this...
Code:
michelle ALL=(ALL) NOPASSWD: /bin/mount michelle ALL=(ALL) NOPASSWD: /bin/umount
A "whoami" at the start of the script confirms it is running as, "michelle."
Comment