Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-22-2012, 04:24 AM   #1
LQ Newbie
Registered: Sep 2011
Posts: 8

Rep: Reputation: Disabled
deleting user

am getting this error please help with steps on how to solve

userdel -r username
userdel: unable to lock password file
Old 11-22-2012, 04:34 AM   #2
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,600

Rep: Reputation: 424Reputation: 424Reputation: 424Reputation: 424Reputation: 424
You need to be root in order to change /etc/passwd file. Use sudo or su.

~$ sudo /usr/sbin/userdel -r username <Enter Root Password when asked, and press Enter>
or you may first su to root:

~$ su root <Password and Enter>
~# userdel username
Hope that helps.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Linux - Newbie 2 06-04-2011 04:59 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Programming 7 06-04-2011 11:47 AM
deleting a user joe k Linux - General 3 12-08-2004 06:31 AM
Deleting a user? WorldBuilder Linux - Software 1 03-28-2003 11:58 AM

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration