Skip to Content
Linux System Administration
book

Linux System Administration

by Tom Adelstein, Bill Lubanovic
March 2007
Intermediate to advanced
304 pages
11h 12m
English
O'Reilly Media, Inc.
Content preview from Linux System Administration
User Management
|
189
Removing a User
Employee turnover in many organizations runs high. So, unless you run a small shop
with a stable user base, you need to learn how to clean up after an employee leaves.
Too many so-called system administrators do not understand the stakes involved
when they manage users. Disgruntled former employees can often cause significant
trouble for a company by gaining access to the network.
Removing a user isn’t a one-step process—you need to manage all of the user’s files,
mailboxes, mail aliases, print jobs, recurring (automatic) personal processes (such as
the backing up of data or remote syncing of directories), and other references to the
user. It is a good idea to first disable the user’s account in /etc/passwd; after that, you
can search for the user’s files and other references. Once all traces of the user have been
cleaned up, you can remove the user completely (if you remove the entry from /etc/
passwd while these other references exist, you have a harder time specifying them).
When you remove a user, it’s a good idea to follow a predetermined course of action
so you don’t forget any important steps; you may even want to make a checklist so
that you have a routine laid out.
The first task is to disable the user’s password, effectively locking him out. You can
do this with a command like the following:
# passwd -l tadelste
Sometimes it’s necessary to temporarily ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Beginning Linux System Administration

Beginning Linux System Administration

Sander van Vugt
Mastering Linux System Administration

Mastering Linux System Administration

Christine Bresnahan, Richard Blum

Publisher Resources

ISBN: 9780596009526Catalog PageErrata