A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

March 5, 2011

sudoers file

First sorry if i posted in wrong section
So, I want to add user to sudoers file to give him permission to del users (to use "userdel command".
I started bash and execute visudo. On the end of file I add new line so it looks like this
"user name" ALL = /usr/sbin/userdel
save the file and quit.
When I try to execute command as users specified in sudoers file I get error message "userdel: cannot lock /etc/passwd; try again later" and I must use "sudo" to del user.
Where I made mistake?
Thanks for help

Click Here!