-   Linux - Newbie (
-   -   how to delete users? (

centr0 03-08-2003 10:57 AM

how to delete users?
how do you delete users?

running RHL8 i checked hat>system settings>user and groups. the user i want to delete is not there. is there any way in the terminal?

Crashed_Again 03-08-2003 10:59 AM

userdel username

If you want to delete there home directory as well you would do:

userdel -r username

Mara 03-08-2003 11:00 AM

'userdel' is the command you're looking for.

centr0 03-08-2003 09:22 PM

there is a user name: nfsnobody

how do i get rid of that?

Mara 03-09-2003 02:27 AM

userdel nfsnobody

centr0 03-09-2003 06:54 AM


# userdel nfsnobody
bash: userdel: command not found

tried that already

acid_kewpie 03-09-2003 07:14 AM

you're not root then. look for it in /sbin/

Mara 03-09-2003 10:42 AM

/sbin/userdel or /usr/sbin/userdel. Better first try
locate userdel
and see the path it says.

cuckoopint 03-09-2003 11:58 AM

there's also 'deluser'

also, there's a seperate option for deleting system users.
lastly, make sure the user is not logged in and does not have running processes.

centr0 03-09-2003 01:48 PM

ok i just did a :

cat /etc/passwd

and i got a whole list off accts on there. do i need all of these accts? which ones can i delete?

lynch 03-09-2003 02:15 PM

Each one of those usernames is there for a reason.It depends on what you do with the computer you run Linux on.For example,if you run an ftp server and you dont want to allow anonymous logon to the ftp server,you would want to remove the user ftp.Dont just start deleting usernames from the passwd file:you could screw things up.

Mara 03-10-2003 12:22 PM

You can delete from /etc/passwd, but you must also do the same in /etc/shadow.

All times are GMT -5. The time now is 11:00 AM.