⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 407-411.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Using Linux:Managing Users and Groups</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0789716232//-->

<!--TITLE=Using Linux//-->

<!--AUTHOR=William Ball//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Que//-->

<!--CHAPTER=25//-->

<!--PAGES=407-411//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="404-407.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="411-414.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">Locking a User</FONT></H4>

<P>There eventually will come a time when a user on your system has become so troublesome that you need to lock him out of the system until you&#146;ve had a chance to talk with him and set him straight. For example, you&#146;ve just found out that the user vector has formed the Internet Terrorist Task Force and is attacking other sites. To lock him out, do the following:

</P>

<P><FONT SIZE="+1"><B><I>Locking out a user</I></B></FONT></P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;At the top of the <TT>usercfg</TT> window, click the Users button. This should bring up the list of users on the system.

<DD><B>2.</B>&nbsp;&nbsp;Click once on Vector&#146;s entry.

<DD><B>3.</B>&nbsp;&nbsp;Click the Lock button at the bottom of the <TT>usercfg</TT> window. This will bring up the Archive User window, as shown in Figure 25.7.

<P><A NAME="Fig7"></A><A HREF="javascript:displayWindow('images/25-07.jpg',254,275 )"><IMG SRC="images/25-07t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/25-07.jpg',254,275)"><FONT COLOR="#000077"><B>Figure 25.7</B></FONT></A>&nbsp;&nbsp;Open the Archive User window.</P>

<DD><B>4.</B>&nbsp;&nbsp;The first choice is what you want to do with Vector&#146;s home directory. The three options are to either ignore it, archive and compress it, or delete it altogether. Ignoring it will leave his home directory intact. Archiving and compressing will cause his home directory to be combined into one large file and compressed with the <TT>tar</TT> and <TT>gzip</TT> commands. (Together, they work similarly to the way WinZip works under Windows.) The last option to is delete his files altogether. In most instances, you will only want to disallow access to your system until you&#146;ve had a chance to talk to your user about inappropriate behavior; thus, select the first option, Ignore.

<DD><B>5.</B>&nbsp;&nbsp;The second option is whether you want to delete the user&#146;s undelivered mail. Unless you have a specific reason to remove it, leave it alone.

<DD><B>6.</B>&nbsp;&nbsp;The last option is whether you want to change the ownership of all the user&#146;s files to the user <TT>nobody</TT>. In most instances, you will not want to do so. Select the option accordingly.

<DD><B>7.</B>&nbsp;&nbsp;Click Done. Another dialog box will appear warning you that locking out a user will cause any changes made so far to be written to disk. click Really Archive if you want to proceed; otherwise, you can cancel the operation.

</DL>

<P>After the home directory is dealt with, the password entry is locked by placing an asterisk character in it, thereby preventing the user from logging in.

</P>

<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">Unlocking a User</FONT></H4>

<P>After you&#146;ve had a chance to talk with your user and you feel that he should have access to the system once again, you will want to unlock his account. To do so, follow these directions:

</P>

<P><FONT SIZE="+1"><B><I>Unlocking a user</I></B></FONT></P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;Click once on the user&#146;s login name in the User Configurator. This will highlight his entry.

<DD><B>2.</B>&nbsp;&nbsp;Click the Unlock button at the bottom of the window. A dialog box will inform you that unlocking a user will cause any changes made so far to be written to disk. If you are sure that you want to unlock the account, click Really Unlock; otherwise, click Cancel.

</DL>

<P>With the home directory back in place, the password entry will have the asterisk character removed, thereby allowing him to enter the system.

</P>

<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">Removing a User</FONT></H4>

<P>Occasionally, you will need to remove a user from the system. To remove the user vector from the system, follow these directions:

</P>

<P><FONT SIZE="+1"><B><I>Removing a user</I></B></FONT></P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;Click vector&#146;s login name in the User Configurator dialog box. This will highlight his entry.

<DD><B>2.</B>&nbsp;&nbsp;Click the Remove button at the bottom of the User Configurator dialog box. This will bring up the Delete User dialog box, as shown in Figure 25.8.

<P><A NAME="Fig8"></A><A HREF="javascript:displayWindow('images/25-08.jpg',254,275 )"><IMG SRC="images/25-08t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/25-08.jpg',254,275)"><FONT COLOR="#000077"><B>Figure 25.8</B></FONT></A>&nbsp;&nbsp;The Delete User dialog box. Note the similarity to the Lock User dialog box shown in the preceding section.</P>

<BR>The menu options in this window are identical to the ones in the Lock User window. Here, however, you will want to take more drastic options if you&#146;re looking to completely remove him from the system. In most cases, you do want all traces of him remoed.

<DD><B>3.</B>&nbsp;&nbsp;The first option allows you to specify how you want the contents of Vector&#146;s home directory dealt with. You will probably want to remove it. click the Delete button.

<DD><B>4.</B>&nbsp;&nbsp;Click the button to delete vector&#146;s mail spool.

<DD><B>5.</B>&nbsp;&nbsp;Click the button to Search for vector&#146;s files to tell the system that you want to find files outside vector&#146;s home directory that he owns (for example, files stored in <TT>/tmp</TT>).

<DD><B>6.</B>&nbsp;&nbsp;Click the radio button to Delete Them under the Search for vector&#146;s Files button. This will cause any files owned by vector found outside vector&#146;s home directory to be deleted.

<DD><B>7.</B>&nbsp;&nbsp;Just to be on the safe side, click the button to Mail a Report of Errors to Root.

<DD><B>8.</B>&nbsp;&nbsp;The Delete User window should look like Figure 25.9 for the options you have selected.

<P><A NAME="Fig9"></A><A HREF="javascript:displayWindow('images/25-09.jpg',254,275 )"><IMG SRC="images/25-09t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/25-09.jpg',254,275)"><FONT COLOR="#000077"><B>Figure 25.9</B></FONT></A>&nbsp;&nbsp;The Delete User dialog box after it has been filled out.</P>

<DD><B>9.</B>&nbsp;&nbsp;Click Done to indicate that you are happy with the selections you have made. You will get a warning about this operation not being undoable. Click Really Delete if you are sure; otherwise, click Cancel.

</DL>

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="404-407.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="411-414.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -