Solved

Remove a user

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

744 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

12 Experts available now in Live!

Get 1:1 Help Now