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

📄 shadow.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Installing Shadow-20001016</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Installing basic system software"HREF="../chapter06/chapter06.html"><LINKREL="PREVIOUS"TITLE="Installing Net-tools-1.60"HREF="../chapter06/net-tools.html"><LINKREL="NEXT"TITLE="Installing Sysklogd-1.4.1"HREF="../chapter06/sysklogd.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter06/net-tools.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 6. Installing basic system software</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter06/sysklogd.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch06-shadow">6.49. Installing Shadow-20001016</A></H1><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">Estimated build time:           3 minutesEstimated required disk space:  6 MB</PRE></FONT></TD></TR></TABLE><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3553">6.49.1. Installation of Shadow Password Suite</A></H2><P>Before you install this package, you may want to have a look at the<AHREF="http://hints.linuxfromscratch.org/hints/shadowpasswd_plus.txt"TARGET="_top">http://hints.linuxfromscratch.org/hints/shadowpasswd_plus.txt</A>lfs hint. It discusses how you can make your system more secure regardingpasswords and how to get the most out of this Shadow package.</P><P>Install the Shadow Password Suite by running the following commands:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cp src/useradd.c src/useradd.c.backup &#38;&#38;sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \牋爏rc/useradd.c &#62; tmp~ &#38;&#38;mv tmp~ src/useradd.c &#38;&#38;./configure --prefix=/usr &#38;&#38;make &#38;&#38;make install &#38;&#38;cd etc &#38;&#38;cp limits login.access /etc &#38;&#38;sed 's%/var/spool/mail%/var/mail%' login.defs.linux &#62; /etc/login.defs &#38;&#38;cd /lib &#38;&#38;mv libshadow.a /usr/lib &#38;&#38;mv libshadow.la /usr/lib &#38;&#38;ln -sf libshadow.so.0 libshadow.so &#38;&#38;cd /usr/lib &#38;&#38;ln -sf ../../lib/libshadow.so</B></TT></PRE></FONT></TD></TR></TABLE></P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3561">6.49.2. Command explanations</A></H2><P><TTCLASS="userinput"><B>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' src/useradd.c &#62; useradd.c.temp &#38;&#38;</B></TT>: This sed is used to fix a compilation bug which occurs due to a variable (nflg) being used but not defined.</P><P><TTCLASS="userinput"><B>cp limits login.access and others:</B></TT> These fileswere not installed during the installation of the package so we copythem manually as those files are used to configure authenticationdetails on the system.</P><P><TTCLASS="userinput"><B>sed "s%/var/spool/mail%/var/mail%" login.defs.linux &#62;/etc/login.defs</B></TT>: /var/spool/mail is the old location of theuser mailboxes. The location that is used nowadays is /var/mail.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3569">6.49.3. Contents</A></H2><P>The Shadow Password Suite contains the chage, chfn, chpasswd, chsh, dpasswd, expiry, faillog, gpasswd, groupadd, groupdel, groupmod, grpck, grpconv, grpunconv, lastlog, login, newgrp, passwd, sg, su, logoutd, mkpasswd, newusers, pwck, pwconv, pwunconv, useradd, userdel, usermod, vigr and vipw programs.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3572">6.49.4. Description</A></H2><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3574">6.49.4.1. chage</A></H3><P>chage changes the number of days between password changes and the date of the last password change.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3577">6.49.4.2. chfn</A></H3><P>chfn changes user full name, office number, office extension, and home phone number information for a user's account.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3580">6.49.4.3. chpasswd</A></H3><P>chpasswd reads a file of user name and password pairs from standard input and uses this information to update a group of existing users.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3583">6.49.4.4. chsh</A></H3><P>chsh  changes the user login shell.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3586">6.49.4.5. dpasswd</A></H3><P>dpasswd adds, deletes, and updates dial-up passwords for user login shells.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3589">6.49.4.6. expiry</A></H3><P>Checks and enforces password expiration policy.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3592">6.49.4.7. faillog</A></H3><P>faillog formats the contents of the failure log,/var/log/faillog, and maintains failure counts and limits.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3595">6.49.4.8. gpasswd</A></H3><P>gpasswd is used to administer the /etc/group file</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3598">6.49.4.9. groupadd</A></H3><P>The groupadd command creates a new group account using the values specified on the command line and the default values from the system.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3601">6.49.4.10. groupdel</A></H3><P>The groupdel command modifies the system account files, deleting all entries that refer to group.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3604">6.49.4.11. groupmod</A></H3><P>The groupmod command modifies the system account files to reflect the changes that are specified on the command line.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3607">6.49.4.12. grpck</A></H3><P>grpck verifies the integrity of the system authentication information.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3610">6.49.4.13. grpconv</A></H3><P>grpunconv converts to shadow group files from normal group files.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3613">6.49.4.14. grpunconv</A></H3><P>grpunconv converts from shadow group files to normal group files.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3616">6.49.4.15. lastlog</A></H3><P>lastlog formats and prints the contents of the last login log, /var/log/lastlog. The login-name, port, and last login time will be printed.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3619">6.49.4.16. login</A></H3><P>login is used to establish a new session with the system.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3622">6.49.4.17. newgrp</A></H3><P>newgrp is used to change the current group ID during a login session.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3625">6.49.4.18. passwd</A></H3><P>passwd changes passwords for user and group accounts.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3628">6.49.4.19. sg</A></H3><P>sg executes command as a different group ID.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3631">6.49.4.20. su</A></H3><P>Change the effective user id and group id to that of a user. Thisreplaces the su programs that's installed from the Shellutils package.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3634">6.49.4.21. logoutd</A></H3><P>logoutd enforces the login time and port restrictions specified in /etc/porttime.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3637">6.49.4.22. mkpasswd</A></H3><P>mkpasswd reads a file in the format given by the flags and converts it to the corresponding database file format.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3640">6.49.4.23. newusers</A></H3><P>newusers reads a file of user name and clear text password pairs and uses this information to update a group of existing users or to create new users.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3643">6.49.4.24. pwck</A></H3><P>pwck verifies the integrity of the system authentication information.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3646">6.49.4.25. pwconv</A></H3><P>pwconv converts to shadow passwd files from normal passwd files.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3649">6.49.4.26. pwunconv</A></H3><P>pwunconv converts from shadow passwd files to normal files.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3652">6.49.4.27. useradd</A></H3><P>useradd creates a new user or update default new user information.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3655">6.49.4.28. userdel</A></H3><P>userdel modifies the system account files, deleting all entries that refer to a specified login name.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3658">6.49.4.29. usermod</A></H3><P>usermod modifies the system account files to reflect the changes that are specified on the command line.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3661">6.49.4.30. vipw and vigr</A></H3><P>vipw and vigr will edit the files /etc/passwd and /etc/group, respectively. With the -s flag, they will edit the shadow versions of those files, /etc/shadow  and /etc/gshadow,  respectively.</P></DIV></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3664">6.49.5. Dependencies</A></H2><P>Shadow-20001016 needs the following to be installed:</P><PCLASS="literallayout"><br>sh&nbsp;from&nbsp;the&nbsp;bash&nbsp;package<br><br>ar&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>as&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>ld&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>nm&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br><br>cmp&nbsp;from&nbsp;the&nbsp;diffutils&nbsp;package<br><br>chmod&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>cp&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>ln&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>ls&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mkdir&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mv&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>rm&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>rmdir&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br><br>cc&nbsp;from&nbsp;the&nbsp;gcc&nbsp;package<br><br>egrep&nbsp;from&nbsp;the&nbsp;grep&nbsp;package<br>grep&nbsp;from&nbsp;the&nbsp;grep&nbsp;package<br><br>make&nbsp;from&nbsp;the&nbsp;make&nbsp;package<br><br>sed&nbsp;from&nbsp;the&nbsp;sed&nbsp;package<br><br>basename&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>expr&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>sleep&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>uname&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br><br>cat&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>sort&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>uniq&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br></P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter06/net-tools.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter06/sysklogd.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Installing Net-tools-1.60</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter06/chapter06.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Installing Sysklogd-1.4.1</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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