📄 1257-1260.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:Administration and Privileged Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<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=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=08 //-->
<!-- PAGES=1257-1422 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="../ch07/1256-1256.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1261-1262.html">Next</A></CENTER></P>
<!-- This HTML document was generated by PageMaker -->
<!-- On Thu Oct 08 16:12:08 1998 from "G:\Macmillan\Original\0672311046\part8a.p65" -->
<A NAME="PAGENUM-1257"><P>Page 1257</P></A>
<H3><A NAME="ch08_ 1">
Part VIII:
</A></H3>
<H2>
Administration <BR>and Privileged <BR>Commands
</H2>
<A NAME="PAGENUM-1258"><P>Page 1258</P></A>
<H3><A NAME="ch08_ 2">
intro
</A></H3>
<P>intro—Introduction to administration and privileged commands.
</P>
<P><B>DESCRIPTION</B>
</P>
<P>This chapter describes commands that either can be or are only used by the superuser, such as daemons and machine
or hardware-related commands.
</P>
<P><B>AUTHORS</B>
</P>
<P>Look at the header of the manual page for the authors and copyright conditions. Note that these can be different from
page to page.
</P>
<P>Linux, 24 July 1993
</P>
<H3><A NAME="ch08_ 3">
adduser, addgroup
</A></H3>
<P>adduser, addgroup—Add a user or group to the system.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE //-->
<PRE>
adduser [--system [--home directory] [--group]] [--quiet]
[--force-badname] [--help] [--version] [--debug] username
adduser [--quiet] [--force-badname] [--help] [--version]
[--debug] username group
adduser [--group] [--quiet] [--force-badname] [--help]
[--version] [--debug] group
</PRE>
<!-- END CODE //-->
<P><B>DESCRIPTION</B>
</P>
<P>adduser and addgroup add users and groups to the system according to information provided in the configuration file
/etc/adduser.conf. adduser and addgroup automatically determine the UID or GID and place the entity in the password
or group file as appropriate.
</P>
<P>If necessary, adduser creates a home directory for the new user, copies "skeletal" user files to it from
/etc/skel, and allows the system administrator to set an initial password and finger information for the user.
</P>
<P>Because it needs to be able to write to such files as
/etc/passwd, adduser can only be run as root.
</P>
<P>Generally, there are two types of users and groups on a system: those users that log into the system and those
"non-user" accounts and groups that exist for various system tasks and projects. Henceforth, user will refer to the login type and
system user or group will refer to the type used for system maintenance and projects.
</P>
<P>By default, each user in Debian GNU/Linux is given a corresponding group with the same name and ID, allowing
people easily to give access to their home directories to others. This option can be turned off in the configuration file, in which
case each user is, by default, added to a group called users.
</P>
<P>Under Debian GNU/Linux, IDs less than or equal to 100 are allocated by the base system maintainer for various
purposes. IDs from 101 to the value specified in the configuration file
(1000, by default) are used for system users and groups.
IDs greater than 1000 are reserved for users and their corresponding groups.
</P>
<P>When invoked with a single name, adduser creates a user with that name. When given two names,
adduser assumes that the first name represents an existing user and that the second name represents an existing group. In this case, the user is added
to the group.
</P>
<A NAME="PAGENUM-1259"><P>Page 1259</P></A>
<P><B>OPTIONS</B>
</P>
<TABLE>
<TR><TD>
--system
</TD><TD>
Create a system user. This user will be assigned the shell
/bin/false and have an asterisk in the password field. Unless otherwise specified, the user will be
placed in the group nogroup. Skeletal configuration files will not be copied into
the user's home directory.
</TD></TR><TR><TD>
--home directory
</TD><TD>
When used with --system, this uses
directory as the user's home directory, rather than the default specified in the configuration file. If the directory
does not exist, it is created.
</TD></TR><TR><TD>
--group
</TD><TD>
When combined with —system, a group with the same name and ID as
the system user is created. If not combined with
--system, a group with the given name is created. This is the default action if the program is invoked as
addgroup.
</TD></TR><TR><TD>
--quiet
</TD><TD>
Suppress progress messages.
</TD></TR><TR><TD>
--force-badname
</TD><TD>
By default, user and group names are required to consist of a lowercase
letter followed by one or more lowercase letters or numbers. This option
forces adduser or addgroup to be more lenient.
</TD></TR><TR><TD>
--help
</TD><TD>
Display brief instructions.
</TD></TR><TR><TD>
--version
</TD><TD>
Display version and copyright information.
</TD></TR><TR><TD>
--debug
</TD><TD>
Display a large quantity of debugging information.
</TD></TR></TABLE>
<P><B>SEE ALSO</B>
</P>
<!-- CODE SNIP //-->
<PRE>
adduser.conf(5)
</PRE>
<!-- END CODE SNIP //-->
<P><B>COPYRIGHT</B>
</P>
<P>Copyright(c) 1995, Ted Hajek, with a great deal borrowed from the original Debian
adduser, copyright(c) 1994, Ian Murdock. adduser is free software; see the GNU General Public License version two or later for copying conditions. There
is no warranty.
</P>
<P>Debian GNU/Linux version 1.94
</P>
<H3><A NAME="ch08_ 4">
agetty
</A></H3>
<P>agetty—Alternative Linux getty.
</P>
<P><B>SYNOPSIS</B>
</P>
<!-- CODE SNIP //-->
<PRE>
agetty [-ihL] [-l login_program] [-m] [-t timeout] port baud_rate,... [term]
agetty [-ihL] [-l login_program] [-m] [-t timeout] baud_rate,... port [term]
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B>
</P>
<P>agetty opens a tty port, prompts for a login name, and invokes the
/bin/login command. It is usually invoked by init(8).
</P>
<P>agetty has several non-standard features that are useful for hard-wired and for dial-in lines:
</P>
<BLOCKQUOTE>
<P>Adapts the tty settings to parity bits and to erase, kill, end-of-line, and uppercase characters when it reads a login
name. The program can handle 7-bit characters with even, odd, none, or space parity and 8-bit characters with no parity.
The following special characters are recognized: @ and Control+U (kill);
#, Del and Backspace (erase); carriage return and
line feed (end of line).
</P>
<P>Optionally deduces the baud rate from the
CONNECT messages produced by Hayes-compatible modems.
</P>
<P>Optionally does not hang up when it is given an already opened line (useful for call-back applications).
</P>
<P>Optionally does not display the contents of the
/etc/issue file (System V only).
</BLOCKQUOTE>
<A NAME="PAGENUM-1260"><P>Page 1260</P></A>
<BLOCKQUOTE>
<P>Optionally invokes a non-standard login program instead of /bin/login.
</P>
<P>Optionally turns on hardware flow control.
</P>
<P>Optionally forces the line to be local with no need for carrier detect.
</BLOCKQUOTE>
<P>This program does not use the /etc/gettydefs (System V) or /etc/gettytab (SunOS 4) files.
</P>
<P><B>ARGUMENTS</B>
</P>
<TABLE>
<TR><TD>
port
</TD><TD>
A path name relative to the /dev directory. If a
_ is specified, agetty assumes that its standard input is already connected to a
tty port and that a connection to a remote user has already been established. Under
System V, a _ port argument should be preceded by a _.
</TD></TR><TR><TD>
baud rate,...
</TD><TD>
A comma-separated list of one or more baud rates. Each time
agetty receives a break character, it advances through the list, which is treated
as if it were circular. Baud rates should be specified in descending order,
so that the null character (Ctrl+@) can also be used for baud rate switching.
</TD></TR><TR><TD>
term
</TD><TD>
The value to be used for the TERM environment variable. This
overrides whatever init(8) may have set and is inherited by login and the shell.
</TD></TR></TABLE>
<P><B>OPTIONS</B></P>
<TABLE>
<TR><TD>
-h
</TD><TD>
Enable hardware (RTS/CTS) flow control. It is left up to the
application to disable software (XON/XOFF) flow protocol where appropriate.
</TD></TR><TR><TD>
-i
</TD><TD>
Do not display the contents of
/etc/issue before writing the login prompt. Terminals or communications hardware might become
confused when receiving lots of text at the wrong baud rate; dial-up scripts
might fail if the login prompt is preceded by too much text.
</TD></TR><TR><TD>
-l login_program
</TD><TD>
Invoke the specified login program instead of
/bin/login. This allows the use of a non-standard login program (for example, one that asks for
a dial-up password or that uses a different password file).
</TD></TR><TR><TD>
-m
</TD><TD>
Try to extract the baud rate the connect status message produced by
some Hayes-compatible modems. These status messages are of the
form:
"<junk><speed><junk>".
agetty assumes that the modem emits its status message at the same speed as specified with (the first) baud
rate value on the command line.
</TD></TR><TR><TD>
</TD><TD>
Because the -m feature might fail on heavily loaded systems, you
still should enable break processing by enumerating all expected baud rates
on the command line.
</TD></TR><TR><TD>
-t timeout
</TD><TD>
Terminate if no username could be read within
timeout seconds. This option should probably not be used with hard-wired lines.
</TD></TR><TR><TD>
-L
</TD><TD>
Force the line to be a local line with no need for carrier detect. This
can be useful when you have a locally attached terminal where the serial
line does not set the carrier detect signal.
</TD></TR></TABLE>
<P><B>EXAMPLES</B>
</P>
<P>This section shows sample entries for the
/etc/inittab file.
</P>
<P>For a hard-wired line:
</P>
<!-- CODE SNIP //-->
<PRE>
tty1:con80x60:/sbin/agetty 9600 tty1
</PRE>
<!-- END CODE SNIP //-->
<P>For a dial-in line with a 9600/2400/1200 baud modem:
</P>
<!-- CODE SNIP //-->
<PRE>
ttyS1:dumb:/sbin/agetty -mt60 ttyS1 9600,2400,1200
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="../ch07/1256-1256.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1261-1262.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -