Solved

Remove a user

Posted on 1998-09-22
5
147 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

821 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