Solved

Remove a user

Posted on 1998-09-22
5
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

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…
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 how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

626 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