The file '/etc/sudoers' should be edited with the editor "visudo".
01. First, create a user called "uddika"
[root@daddylinux~]#useradd uddika
[root@daddylinux~]#passwd uddika
[root@daddylinux~]#passwd uddika
02. To give a specific group of users limited root privileges, edit the file with visudo as follows:
[root@daddylinux~]# visudo
03. Go down to the line ‘# User privilege specification‘and add the following line.
uddika ALL=(ALL) ALL
This doesn't seem to actually work on CentOS 6.2. If you think it does, please publish keystroke-by-keystroke directions for running on a vanilla system.
ReplyDeleteDefinitely agree with you. A vanilla install of CentOS 6.2 doesn't seem to have a "sudoers" file in /etc/ as is indicated above. And the visudo command doesn't work - presumably for a related reason.
Deleteyum install sudo -y
ReplyDeletethen it works
Hellooo...the very fact these fellows cannot be listed in the sudoers file means they cannot perform any task on a console. Why? Because your command does nothing unless 'sudo' is in front AND it then asks for your p/w which - when typed in - gets the response that you're not listed in sudoers file! Round and round we go.
ReplyDeletehe meant run the command as root...
ReplyDeleteset the UID:GUD bits to 0:0 in /etc/passwd always works.
ReplyDeleteSay for example the new user is 'spider', then the line in passwd file should look like:
spider:x:0:0::/home/spider:/sbin/nologin
its nice..but i want to be add multiple users in visudo file...act like root user....what i will do?
ReplyDeletefirst enter su -
ReplyDeleteput in the password used during installation
input above commands
visudo should now work as well
pidarasnja ne pokazivajuwaja kommenti...
ReplyDelete