shadow/man/sv/useradd.8

236 lines
7.7 KiB
Groff

.\" Title: useradd
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\" Date: 20.07.2006
.\" Manual: Systemhanteringskommandon
.\" Source: Systemhanteringskommandon
.\"
.TH "USERADD" "8" "20\-07\-2006" "Systemhanteringskommandon" "Systemhanteringskommandon"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAMN"
useradd \- skapa en ny användare eller uppdatera standardinformation för nya anvÃ\(Csndare
.SH "SYNOPSIS"
.HP 8
\fBuseradd\fR [\fIflaggor\fR] \fIINLOGGNINGSNAMN\fR
.HP 8
\fBuseradd\fR \-D
.HP 8
\fBuseradd\fR \-D [\fIflaggor\fR]
.SH "BESKRIVNING"
.PP
When invoked without the
\fB\-D\fR
option, the
\fBuseradd\fR
command creates a new user account using the values specified on the command line and the default values from the system. Depending on command line options, the useradd command will update system files and may also create the new user's home directory and copy initial files.
.SH "FLAGGOR"
.PP
Flaggorna som gäller för kommandot
\fBuseradd\fR
är:
.TP 3n
\fB\-c\fR, \fB\-\-comment\fR\fIKOMMENTAR\fR
Any text string. It is generally a short description of the login, and is currently used as the field for the user's full name.
.TP 3n
\fB\-b\fR, \fB\-\-base\-dir\fR \fIBASE_DIR\fR
The default base directory for the system if
\fB\-d\fR
dir is not specified.
\fIBASE_DIR\fR
is concatenated with the account name to define the home directory. If the
\fB\-m\fR
option is not used,
\fIBASE_DIR\fR
must exist.
.TP 3n
\fB\-d\fR, \fB\-\-home\fR\fIHEM_KAT\fR
The new user will be created using
\fIHOME_DIR\fR
as the value for the user's login directory. The default is to append the
\fILOGIN\fR
name to
\fIBASE_DIR\fR
and use that as the login directory name. The directory
\fIHOME_DIR\fR
does not have to exist but will not be created if it is missing.
.TP 3n
\fB\-e\fR, \fB\-\-expiredate\fR\fIUTGÅNGSDATUM\fR
The date on which the user account will be disabled. The date is specified in the format
\fIYYYY\-MM\-DD\fR.
.TP 3n
\fB\-f\fR, \fB\-\-inactive\fR\fIINAKTIV\fR
The number of days after a password expires until the account is permanently disabled. A value of 0 disables the account as soon as the password has expired, and a value of \-1 disables the feature. The default value is \-1.
.TP 3n
\fB\-g\fR, \fB\-\-gid\fR\fIGRUPP\fR
The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already existing group. The default group number is 1 or whatever is specified in
\fI/etc/default/useradd\fR.
.TP 3n
\fB\-G\fR, \fB\-\-groups\fR\fIGRUPP1\fR[\fI,GRUPP2,...\fR[\fI,GRUPPN\fR]]]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the
\fB\-g\fR
option. The default is for the user to belong only to the initial group.
.TP 3n
\fB\-h\fR, \fB\-\-help\fR
Visa hjälpmeddelande och avsluta.
.TP 3n
\fB\-m\fR, \fB\-\-create\-home\fR
The user's home directory will be created if it does not exist. The files contained in
\fISKEL_DIR\fR
will be copied to the home directory if the
\fB\-k\fR
option is used, otherwise the files contained in
\fI/etc/skel\fR
will be used instead. Any directories contained in
\fISKEL_DIR\fR
or
\fI/etc/skel\fR
will be created in the user's home directory as well. The
\fB\-k\fR
option is only valid in conjunction with the
\fB\-m\fR
option. The default is to not create the directory and to not copy any files.
.TP 3n
\fB\-K\fR, \fB\-\-key\fR\fINYCKEL\fR=\fIVÄRDE\fR
Åsidosätter standardvärden för /etc/login.defs (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS och others).
Exempel:
\fB\-K \fR\fILÖSEN_MAX_DAGAR\fR=\fI\-1\fR
kan användas när systemkonton skapas för att stänga av lösenordsåldring, även om systemkontot inte har något lösenord alls. Flera av flaggan
\fB\-K\fR
kan anges, t.ex.:
\fB\-K \fR\fIUID_MIN\fR=\fI100\fR\fB \-K \fR\fIUID_MAX\fR=\fI499\fR
.sp
Notera:
\fB\-K \fR\fIUID_MIN\fR=\fI10\fR,\fIUID_MAX\fR=\fI499\fR
fungerar ännu inte.
.TP 3n
\fB\-o\fR, \fB\-\-non\-unique\fR
Allow the creation of a user account with a duplicate (non\-unique) UID.
.TP 3n
\fB\-p\fR, \fB\-\-password\fR\fILÖSENORD\fR
The encrypted password, as returned by
\fBcrypt\fR(3). The default is to disable the account.
.TP 3n
\fB\-s\fR, \fB\-\-shell\fR\fISKAL\fR
The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell.
.TP 3n
\fB\-u\fR, \fB\-\-uid\fR\fIUID\fR
The numerical value of the user's ID. This value must be unique, unless the
\fB\-o\fR
option is used. The value must be non\-negative. The default is to use the smallest ID value greater than 999 and greater than every other user. Values between 0 and 999 are typically reserved for system accounts.
.SS "Ändrar standardvärden"
.PP
When invoked with the
\fB\-D\fR
option,
\fBuseradd\fR
will either display the current default values, or update the default values from the command line. The valid options are
.TP 3n
\fB\-b\fR, \fB\-\-base\-dir\fR \fIBASE_DIR\fR
The initial path prefix for a new user's home directory. The user's name will be affixed to the end of
\fIHOME_DIR\fR
to create the new directory name if the
\fB\-d\fR
option is not used when creating a new account.
.TP 3n
\fB\-e\fR, \fB\-\-expiredate\fR\fIUTGÅNGSDATUM\fR
Datumet när användarkontot blir inaktiverat.
.TP 3n
\fB\-f\fR, \fB\-\-inactive\fR\fIINAKTIV\fR
Antalet dagar efter att ett lösenord har gått ut innan kontot kommer att inaktiveras.
.TP 3n
\fB\-g\fR, \fB\-\-gid\fR\fIGRUPP\fR
The group name or ID for a new user's initial group. The named group must exist, and a numerical group ID must have an existing entry.
.TP 3n
\fB\-s\fR, \fB\-\-shell\fR\fISKAL\fR
Namnet på den nya användarens inloggningsskal. Det angivna programmet kommer att användas för alla nya framtida användarkonton.
.PP
Om inga flaggor anges kommer
\fBuseradd\fR
att visa aktuella standardvärden.
.\" end of SS subsection "Ändrar standardvärden"
.SH "NOTERINGAR"
.PP
Systemadministratören är ansvarig för att placera standardanvändarfiler i katalogen
\fI/etc/skel/\fR.
.SH "TÄNK PÅ"
.PP
Du får inte lägga till en användare till en NIS\-grupp. Detta måste genomföras på NIS\-servern.
.PP
Similarly, if the username already exists in an external user database such as NIS,
\fBuseradd\fR
will deny the user account creation request.
.PP
Användarnamn måste börja med en gemen bokstav eller ett understreck och fÃ\(Yer endast innehålla gemener, understreck, minustecken och på slutet ett dollar\-tecken. I reguljära uttryckstermer: [a\-z_][a\-z0\-9_\-]*[$]
.SH "FILER"
.TP 3n
\fI/etc/passwd\fR
Användarkontoinformation.
.TP 3n
\fI/etc/shadow\fR
Säker användarkontoinformation.
.TP 3n
\fI/etc/group\fR
Gruppkontoinformation.
.TP 3n
\fI/etc/default/useradd\fR
Standardvärden för skapande av konto.
.TP 3n
\fI/etc/skel/\fR
Katalog som innehåller standardfiler.
.TP 3n
\fI/etc/login.defs\fR
Shadow password suite configuration.
.SH "AVSLUTNINGSVÄRDEN"
.PP
Kommandot
\fBuseradd\fR
avslutas med följande värden:
.TP 3n
\fI0\fR
lyckad
.TP 3n
\fI1\fR
kan inte uppdatera lösenordsfilen
.TP 3n
\fI2\fR
ogiltig kommandosyntax
.TP 3n
\fI3\fR
ogiltigt argument till flagga
.TP 3n
\fI4\fR
UID används redan (och inget
\fB\-o\fR)
.TP 3n
\fI6\fR
angiven grupp finns inte
.TP 3n
\fI9\fR
användarnamnet används redan
.TP 3n
\fI10\fR
kan inte uppdatera gruppfilen
.TP 3n
\fI12\fR
kan inte skapa hemkatalog
.TP 3n
\fI13\fR
kan inte skapa postkö
.SH "SE OCKSÅ"
.PP
\fBchfn\fR(1),
\fBchsh\fR(1),
\fBpasswd\fR(1),
\fBcrypt\fR(3),
\fBgroupadd\fR(8),
\fBgroupdel\fR(8),
\fBgroupmod\fR(8),
\fBlogin.defs\fR(5),
\fBnewusers\fR(8),
\fBuserdel\fR(8),
\fBusermod\fR(8).