LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how do i delete users? (http://www.linuxquestions.org/questions/linux-general-1/how-do-i-delete-users-26196/)

ShawnD 07-20-2002 02:53 AM

how do i delete users?
 
i added a user which i now want to delete. i was thinxin that if i editted out the line saying that user exists in the file /etc/passwd but if that isn't the only place that user shows up, it's like shooting myself in the food because it screws up the system.

if you know the command, please share it :)

MasterC 07-20-2002 03:31 AM

/usr/sbin/userdel

Check out:
http://www-jerry.oit.duke.edu/linux/...del_users.html

ShawnD 07-20-2002 04:14 AM

thanks dude, i made a backup on my forum incase i forget that :)

MasterC 07-20-2002 04:14 AM

Your welcome, glad I could help. ;)

lynch 07-20-2002 05:07 AM

/sbin/userdel -r would take care of that,wouldnt it?
lynch

ShawnD 07-20-2002 05:17 AM

"no such file or directory"

the first guy was right ;)

MasterC 07-20-2002 05:19 AM

Only this time, Lynch appears to be right 99.998% of the time though. The .001% that I have ever read is just this one, but it's probably just because of distro differences. He appears to know his Linux very well. :)

lynch 07-20-2002 05:42 AM

*Post embarrassing admition here*
I quite forgot to include the usr directory in my command.
Thanks,guys.I try to be a careful Linux user:)
lynch

linuxcool 07-20-2002 09:21 PM

lynch, you have it right. I checked the man page and it indicated that all you needed was the -r and the user name.

It could be that userdel is not in /sbin on his system. It could be in /usr/sbin as MasterC said. So, /usr/sbin/userdel -r <user_name> should have worked.

JHuizingh 07-22-2002 10:06 AM

Just for clarification, using userdel without flags removes the user. userdel -r removes the home directory as well.


All times are GMT -5. The time now is 09:01 AM.