Solved

Remove a user

Posted on 1998-09-22
5
146 Views
Last Modified: 2013-12-06
I know how to add a user, but I can't seem to get rid of them. How do I do this? Is there a similiar command to "adduser" or is it way more complicated? I am using Red Hat version 5.0 but also have the same problem on a slackware machine in the building.
0
Comment
Question by:Schandor
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
fmismetti earned 30 total points
ID: 1638111
Use the following command:

userdel loginname

or

userdel -r loginname

With -r you delete the user and also remove the user's home directory. This command works for sure with slackware.

Hope it helps
0
 
LVL 1

Author Comment

by:Schandor
ID: 1638112
OK fmismetti's answer worked on the Red Hat but did not work on the slackware. I kept getting a Bash: Command not found. Is there a way that I can load this command in. We kind of inherited the slackware's configuration but now we are stuck with it being our mail server.
0
 
LVL 1

Author Comment

by:Schandor
ID: 1638113
OK fmismetti's answer worked on the Red Hat but did not work on the slackware. I kept getting a Bash: Command not found. Is there a way that I can load this command in. We kind of inherited the slackware's configuration but now we are stuck with it being our mail server.
0
 
LVL 1

Expert Comment

by:fmismetti
ID: 1638114
Well, normally you have this utility in every plain installation of slackware, under /usr/sbin/userdel. If you have access to a CD containing slackware....

If no, you can remove a user manually, just editing:

/etc/passwd - user account information
/etc/shadow - secure user account information
/etc/group - group information

Remove the entire line containing reference to the user in the first two files and remove reference to the user in the third. Then remove the directory /home/username.

0
 

Expert Comment

by:shooters
ID: 1638115
Don't forget to delete thier mailbox from /var/spool/mail
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now