Deleting a User ID

General discussion about Linux, Linux distribution, using Linux etc.

Deleting a User ID

Postby Misam Shah » Thu Aug 20, 2009 4:43 pm

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??
Misam Shah
Lance Naik
 
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
WLM: misamshah@hotmail.com
Yahoo Messenger: misamshah@yahoo.com
Location: Hyderabad

Postby shahzor » Mon Aug 24, 2009 7:56 am

can you access the /etc/passwd file
LinuxBoy
shahzor
Naik
 
Posts: 72
Joined: Thu Jun 29, 2006 11:33 am
ICQ: 000
WLM: none
Yahoo Messenger: shahzor007@yahoo.com
AOL: none
Location: Quetta

Postby Misam Shah » Tue Aug 25, 2009 11:40 am

Yes I can.
Misam Shah
Lance Naik
 
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
WLM: misamshah@hotmail.com
Yahoo Messenger: misamshah@yahoo.com
Location: Hyderabad

Postby x2oxen » Thu Aug 27, 2009 1:14 pm

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
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

Postby Misam Shah » Thu Aug 27, 2009 1:21 pm

Yes brother.
Misam Shah
Lance Naik
 
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
WLM: misamshah@hotmail.com
Yahoo Messenger: misamshah@yahoo.com
Location: Hyderabad

solution

Postby saifkhan123 » Sat Aug 29, 2009 12:21 pm

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.
saifkhan123
Cadet
 
Posts: 7
Joined: Thu Apr 23, 2009 8:26 am


Return to “%s” General

Who is online

Users browsing this forum: No registered users and 2 guests

cron