how to expect with sudo?
im trying to get my computer to refresh my sources on login, but i need root privedges so what i have in mind is something like this:
Code:
sudo zypper ref |
The best way to do that is to edit the sudoers file to allow that command to be run through sudo without a password (that way running "sudo command" will not prompt for a password, by-passing this issue). It is a large security hole to have your password anywhere in plain-text.
The sudoers file can be edited by running "sudo visudo", and it will check the file for errors when you try to save your changes. Do read the man page though, as the sudoers file is not forgiving to syntax errors. |
is it possible that i can execute a certain command as sudo, like
sudo zypper ref but that s the only command i can run without a password? btw, i found this attached to a music file i (legally) downloaded, does it mean anything? 00002545 00000A54 0000EF32 00007DD5 0002A178 0002EC0F 00009734 000092F9 00034192 0003190F just curious |
Quote:
Code:
ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm |
ok, I edited my /etc/sudoers file according to the man page, but it still asks me for a root password
here is my /etc/sudoers: Code:
# sudoers file. thanks, rabbit2345 |
All times are GMT -5. The time now is 06:05 PM. |