table of contents
other sections
PASSWD(1) | Användarkommandon | PASSWD(1) |
NAMN¶
passwd - ändra användarlösenordSYNOPSIS¶
passwd [flaggor] [INLOGGNINGSNAMN]
BESKRIVNING¶
The passwd command changes passwords for user accounts. A normal user may only change the password for his/her own account, while the superuser may change the password for any account. passwd also changes the account or associated password validity period.Lösenordsändringar¶
The user is first prompted for his/her old password, if one is present. This password is then encrypted and compared against the stored password. The user has only one chance to enter the correct password. The superuser is permitted to bypass this step so that forgotten passwords may be changed. Efter att lösenordet har matats in kontrolleras lösenordets åldringsinformation för att se om användaren tillåts att ändra lösenord för tillfället. Om inte, nekar passwd att ändra lösenordet och avslutas. Användaren frågas sedan två gånger efter ett ersättande lösenord. Den andra inmatningen jämförs mot den första och båda måste stämma överens för att lösenordet ska ändras. Sedan testas lösenordet för sin komplexitet. Som en allmän riktlinje bör lösenord innehålla 6 till 8 tecken och inkluderas ett eller flera tecken från var och en av följande punkter:•gemena bokstäver ur alfabetet
•siffrorna 0 till 9
•skiljetecken
Tänk på att inte inkludera systemets standardtecken för
radering eller döda. passwd kommer att neka alla lösenord
som inte har lämplig komplexitet.
Tips för användarlösenord¶
The security of a password depends upon the strength of the encryption algorithm and the size of the key space. The legacy UNIX System encryption method is based on the NBS DES algorithm. More recent methods are now recommended (see ENCRYPT_METHOD). The size of the key space depends upon the randomness of the password which is selected. Problem i lösenordssäkerheten brukar normalt komma från slarvigt valda lösenord eller hantering. Av denna anledning bör du inte välja ett lösenord som finns i en ordbok eller som måste skrivas ner. Lösenordet bör heller inte vara ett korrekt namn, ditt personnummer, födelsedatum eller gatuadress. Dessa kan användas som gissningar för att ta sig in i systemet. You can find advices on how to choose a strong password on http://en.wikipedia.org/wiki/Password_strengthFLAGGOR¶
Flaggorna som gäller för kommandot passwd är: -a, --allDenna flagga kan endast användas med -S och
gör att status visas för alla användare.
-d, --delete
Ta bort en användares lösenord (gör
det blankt). Detta är ett snabbt sätt att inaktivera ett
lösenord för ett konto. Det kommer att ta bort det angivna
kontots lösenord.
-e, --expire
Lösenordet för ett konto sätts
omedelbart som utgånget. Detta kan tvinga en användare att
ändra sitt lösenord vid nästa
inloggningsförsök.
-h, --help
Visa hjälpmeddelande och avsluta.
-i, --inactive INAKTIV
Denna flagga används för att inaktivera ett
konto efter att lösenordet har varit utgånget i ett antal dagar.
Efter att ett användarkonto har haft ett utgånget
lösenord i INAKTIV dagar får användaren inte
längre logga in med detta konto.
-k, --keep-tokens
Indicate password change should be performed only for
expired authentication tokens (passwords). The user wishes to keep their
non-expired tokens as before.
-l, --lock
Lock the password of the named account. This option
disables a password by changing it to a value which matches no possible
encrypted value (it adds a ´!´ at the beginning of the
password).
Note that this does not disable the account. The user may still be able to login
using another authentication token (e.g. an SSH key). To disable the account,
administrators should use usermod --expiredate 1 (this set the
account's expire date to Jan 2, 1970).
Users with a locked password are not allowed to change their password.
-n, --mindays MIN_DAYS
Sätter minimalt antal dagar mellan
lösenordsändringar till MIN_DAGAR. Ett nollvärde
för detta fält betyder att användaren kan ändra
sitt lösenord när som helst.
-q, --quiet
Tyst läge.
-r, --repository FÖRRÅD
change password in REPOSITORY repository
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use
the configuration files from the CHROOT_DIR directory.
-S, --status
Display account status information. The status
information consists of 7 fields. The first field is the user's login name.
The second field indicates if the user account has a locked password (L), has
no password (NP), or has a usable password (P). The third field gives the date
of the last password change. The next four fields are the minimum age, maximum
age, warning period, and inactivity period for the password. These ages are
expressed in days.
-u, --unlock
Unlock the password of the named account. This option
re-enables a password by changing the password back to its previous value (to
the value before using the -l option).
-w, --warndays VARN_DAGAR
Sätter antalet dagar för varning
före ett lösenord behöver ändras. Flaggan
VARN_DAGAR är antalet dagar före användaren varnas
om att lösenordet är på väg att bli
utgånget.
-x, --maxdays MAX_DAGAR
Sätter maximalt antal dagar som ett
lösenord ska vara giltigt. Efter MAX_DAGAR krävs det att
lösenordet ändras.
TÄNK PŶ
Password complexity checking may vary from site to site. The user is urged to select a password as complex as he or she feels comfortable with. Users may not be able to change their password on a system if NIS is enabled and they are not logged into the NIS server. passwd uses PAM to authenticate users and to change their passwords.FILER¶
/etc/passwdAnvändarkontoinformation.
/etc/shadow
Säker användarkontoinformation.
/etc/pam.d/passwd
PAM configuration for passwd.
AVSLUTNINGSVÄRDEN¶
Kommandot passwd avslutas med följande värden: 0lyckad
1
åtkomst nekad
2
ogiltig kombination av flaggor
3
oväntat fel, ingenting har genomförts
4
oväntat fel, filen passwd saknas
5
Filen passwd är upptagen, försök
igen
6
ogiltigt argument till flagga
SE OCKSŶ
chpasswd(8), passwd(5), shadow(5), usermod(8).17-05-2017 | shadow-utils 4.2 |