Deleting a User ID

General discussion about Linux, Linux distribution, using Linux etc.
Post Reply
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Deleting a User ID

Post by Misam Shah »

Assalamo Alekum & Hello All,
I've a problem in deleting a user ID from deluser command.
It shows this

deluser ali.shaikh
Removing user `ali.shaikh'...
userdel: error deleting password entry
userdel: error deleting shadow password entry
done.

then I used this command deluser --remove-all-files ali.shaikh then it showed this

Looking for files to backup/remove...
Removing files...
Removing user `ali.shaikh'...
userdel: error deleting password entry
userdel: error deleting shadow password entry
done.

I need to delete this user account. Can any one help in this regard??
shahzor
Naik
Posts: 72
Joined: Thu Jun 29, 2006 11:33 am
Location: Quetta
Contact:

Post by shahzor »

can you access the /etc/passwd file
LinuxBoy
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post by Misam Shah »

Yes I can.
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

You are logged in as root user and u haven't messed up with /etc/passwd and /etc/shadow ownership and permissions right??
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post by Misam Shah »

Yes brother.
saifkhan123
Cadet
Posts: 7
Joined: Thu Apr 23, 2009 8:26 am

solution

Post by saifkhan123 »

tell me that the info of user which u r deleting is present in /etc/password file and /etc/shadow file? if yes than you have to make sure that no process from that user is running, you can check that by

Code: Select all

ps -eaf | grep username
if some process is running by that user kill that process by Pid and than try to del the user, try this command

Code: Select all

userdel -r "username"
everything that seems to be true is not always true.
Post Reply