LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-27-2003, 11:37 AM   #1
cuss
Member
 
Registered: Dec 2002
Posts: 63

Rep: Reputation: 15
removing/deleting a user


Hi,

Kind of an easy thing to do...but i can' delete this user!! i've tried:

[root@xxxx]# /usr/sbin/userdel 'user'
(tells me 'user' does not exist)

[root@xxxx /home]# rmdir 'user'
(directory not empty....but it is empty....ls -l shows nothing)

[root@xxxx /home]# rm -f 'user'
('user' is a directory)

How do I accomplish this easy task?
Thanks.
 
Old 02-27-2003, 11:52 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
You don't say what distro you use - if Mdk or RH, etc is there not an option in the Config menu - userdrake or somesuch. It seems like your system won't allow you to remove individual 'user' components, a userdrake or userdrake type program should allow clean removal.

Have you checked through your user docs?
 
Old 02-27-2003, 12:33 PM   #3
cuss
Member
 
Registered: Dec 2002
Posts: 63

Original Poster
Rep: Reputation: 15
I've checked what i have (limited docs) and looked online. It is a redhat 7.2 system.
 
Old 02-27-2003, 12:50 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Why do you have ' ' around the username? Have you tried:

userdel user

??? Also do:

rm -rf /home/user

or you can tell the userdel command to automatically remove the users home directory by doing:

userdel -r user
 
Old 02-27-2003, 02:05 PM   #5
cuss
Member
 
Registered: Dec 2002
Posts: 63

Original Poster
Rep: Reputation: 15
Thanks Crashed_Again!

I tried 2 of the 3 choices you suggested and i kept getting 'bash: command userdel not found'. But it's there so i'm not sure what's up. Anyways, 'rm -rf /home/user' deleted the user i needed to get rid of.

Thanks again.
 
Old 02-27-2003, 02:53 PM   #6
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
userdel is probably not in your path. I guess you would have to do:

/usr/sbin/userdel -r user

Alright!
 
Old 02-27-2003, 02:56 PM   #7
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
Remove the user's entry in the /etc/passwd and /etc/group and they're gone!

edit: you'll still need to delete their /home/ dir.

Last edited by PTBmilo; 02-27-2003 at 02:58 PM.
 
Old 02-27-2003, 03:27 PM   #8
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Just as a quick side note, ls -l will not show hidden files (i.e. files that start with a period). To show those hidden files/dirs us ls -al instead.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a User carlosinfl Linux - General 2 11-10-2005 02:33 PM
Removing a Directory from the Terminal without deleting each file or folder lennysokol Linux - General 4 05-31-2005 12:30 AM
deleting a user joe k Linux - General 3 12-08-2004 07:31 AM
Deleting a user leecming Linux - Newbie 8 06-12-2004 03:17 PM
Deleting old kernel and removing it from boot loader? Koolinux Linux - General 4 11-07-2002 07:10 PM


All times are GMT -5. The time now is 01:07 PM.

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