LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to delete users? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-delete-users-48853/)

centr0 03-08-2003 11: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 11:59 AM

userdel username

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

userdel -r username

Mara 03-08-2003 12:00 PM

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

centr0 03-08-2003 10:22 PM

there is a user name: nfsnobody

how do i get rid of that?

Mara 03-09-2003 03:27 AM

userdel nfsnobody

centr0 03-09-2003 07:54 AM

Code:

# userdel nfsnobody
bash: userdel: command not found

tried that already

acid_kewpie 03-09-2003 08:14 AM

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

Mara 03-09-2003 11:42 AM

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

cuckoopint 03-09-2003 12:58 PM

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 02: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 03: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.
lynch

Mara 03-10-2003 01: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 04:52 PM.