Sudo question
Hi folks,
FC2 On running following commands; $ man visudo It works $ su Password: # visudo bash: visudo: command not found # rpm -qa | grep visudo # rpm -qa | grep sudoers both no printout # rpm -qa | grep sudo* sudo-1.6.7p5-26 already installed. # cat /etc/sudoers Code:
..... TIA B.R. satimis |
It runs every time you boot. But the way it's set up now the only user given privileges is root. As far as I know, you have to use visudo to change the file--that's what the manual says, anyway. Can you obtain visudo from your installation disks, or maybe download it for your distribution? Then with visudo available, you can refer to the man pages and follow the instructions for adding a user to the sudoers list. It took me a while to figure out the right way, but I got it done eventually.
P. S. Have you tried something like "locate visudo" to see if it's somewhere not in your path? If you just issue the visudo command and the program isn't in your path, it will not be found. |
try su'ing this way:
Code:
/bin/su - Either do a '/bin/su -', or type the full path to visudo once you su to root. then add yourself to the sudoers file. Another trick I do is make sure that I have the same $PATH variable as root by editing /etc/profile like so: Code:
# Path manipulation |
For what it's worth, on my FC2 install visudo is located in /usr/sbin. You might look there.
|
Hi growler,
Tks for your advice. Quote:
Code:
..... "if [ `id -u` = 0 ] || [ `id -u` = <your uid here> ]; then" || = OR ??? your uid here = login ??? TIA B.R. satimis |
Quote:
So you are saying 'if the person logging on has a uid of 0 (ie 'root') OR a uid of x, then give her a $PATH of...' This way you and root both have the same path, so sudo won't constantly complain about not finding certain executables. Your 'uid' is the identification number that your system knows you by. your login name is only a human-friendly alias for this number. you can find your uid by looking in the /etc/passwd file. The first number is your user id number, and the 2nd is your group id number. you can see the uid numbers associated with files by typing Code:
ls -ln Good luck, satimis! |
Hi growler,
Tks for your advice. Quote:
-rw-rw-r-- 1 500 500 9728 11æ 19 04:00 Standard.doc What did the third number '0' and '9728' indicate. B.R. satimis |
All times are GMT -5. The time now is 11:23 PM. |