summaryrefslogtreecommitdiff
path: root/sag-0.6.1-www/Invisible/sag-0.6/node94.html
blob: 80d22ad5c4610bc3604d61d0d7dbc5dd2d4a2c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Removing a user</TITLE>
<META NAME="description" CONTENT="Removing a user">
<META NAME="keywords" CONTENT="sag">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="sag.css">
</HEAD>
<BODY LANG="EN" >
 <A NAME="tex2html1498" HREF="node95.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1496" HREF="node86.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1490" HREF="node93.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1500" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1501" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1499" HREF="node95.html">Disabling a user temporarily</A>
<B>Up:</B> <A NAME="tex2html1497" HREF="node86.html">Managing user accounts</A>
<B> Previous:</B> <A NAME="tex2html1491" HREF="node93.html">Changing user properties</A>
<BR> <P>
<H1><A NAME="SECTION001040000000000000000">Removing a user</A></H1>
<P>
	To remove a user, you first remove all his files,
	mailboxes, mail aliases, print jobs, <tt>cron</tt><A NAME="2893">&#160;</A> and
	<tt>at</tt><A NAME="2895">&#160;</A> jobs, and all other references to the user.
	Then you remove the relevant lines from <tt>/etc/passwd</tt><A NAME="2897">&#160;</A>
	and <tt>/etc/group</tt><A NAME="2899">&#160;</A> (remember to remove the username from
	all groups it's been added to). It may be a good idea
	to first disable the account (see below), before you
	start removing stuff, to prevent the user from using the
	account while it is being removed.
<P>
	Remember that users may have files outside their home
	directory. The <tt>find</tt><A NAME="2901">&#160;</A> command can find them:
<BLOCKQUOTE> <TT>
find / -user <i>username</i>
</TT></BLOCKQUOTE>
	However, note that the above command will take a <em>long</em>
	time, if you have large disks. If you mount network disks
	(see section&nbsp;<A HREF="node16.html#secNFS">2.3.8</A>), you need to be careful so
	that you won't trash the network or the server.
<P>
	Some Linux distributions come with special commands
	to do this; look for <tt>deluser</tt><A NAME="2903">&#160;</A> or <tt>userdel</tt><A NAME="2905">&#160;</A>.
	However, it is easy to do it by hand as well, and the
	commands might not do everything.
<P>
<BR> <HR>
<P><ADDRESS>
<I>Lars Wirzenius <BR>
Sat Nov 15 02:32:11 EET 1997</I>
</ADDRESS>
</BODY>
</HTML>