Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

passwd(1) [v7 man page]

PASSWD(1)						      General Commands Manual							 PASSWD(1)

NAME
passwd - change login password SYNOPSIS
passwd [ name ] DESCRIPTION
This command changes (or installs) a password associated with the user name (your own name by default). The program prompts for the old password and then for the new one. The caller must supply both. The new password must be typed twice, to forestall mistakes. New passwords must be at least four characters long if they use a sufficiently rich alphabet and at least six characters long if monocase. These rules are relaxed if you are insistent enough. Only the owner of the name or the super-user may change a password; the owner must prove he knows the old password. FILES
/etc/passwd SEE ALSO
login(1), passwd(5), crypt(3) Robert Morris and Ken Thompson, Password Security: A Case History PASSWD(1)

Check Out this Related Man Page

PASSWD(1)						    BSD General Commands Manual 						 PASSWD(1)

NAME
passwd -- modify a user's password SYNOPSIS
passwd [-i infosystem [-l location]] [-u authname] [user] DESCRIPTION
The passwd utility changes the user's password. If the user is not the super-user, passwd first prompts for the current password and will not continue unless the correct password is entered. When entering the new password, the characters entered do not echo, in order to avoid the password being seen by a passer-by. The passwd utility prompts for the new password twice in order to detect typing errors. The new password should be at least six characters long and not purely alphabetic. Its total length should be less than _PASSWORD_LEN (cur- rently 128 characters), although some directory systems allow longer passwords. Numbers, upper case letters, and meta characters are encour- aged. Once the password has been verified, passwd communicates the new password to the directory system. -i infosystem This option specifies where the password update should be applied. Under Mac OS X 10.5 and later, supported directory systems are: PAM (default) Pluggable Authentication Modules. opendirectory A system conforming to Open Directory APIs and supporting updates (including LDAP, etc). If no -l option is specified, the search node is used. file The local flat-files (included for legacy configurations). nis A remote NIS server containing the user's password. -l location This option causes the password to be updated in the given location of the chosen directory system. for file, location may be a file name (/etc/master.passwd is the default) for nis, location may be a NIS domainname for opendirectory, location may be a directory node name for PAM, location is not used -u authname This option specifies the user name to use when authenticating to the directory node. user This optional argument specifies the user account whose password will be changed. This account's current password may be required, even when run as the super-user, depending on the directory system. FILES
/etc/master.passwd The user database /etc/passwd A Version 7 format password file /etc/passwd.XXXXXX Temporary copy of the password file SEE ALSO
chpass(1), login(1), dscl(1), passwd(5), pwd_mkdb(8), vipw(8) Robert Morris and Ken Thompson, UNIX password security. HISTORY
A passwd command appeared in Version 6 AT&T UNIX. Mac OS X August 18, 2008 Mac OS X
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

combine 2 lines (command & echo)

does anyone know how to combine 2 lines? this is what im playing around with. (filename: online, user name: prml0001, real name: primal) #!/bin/sh who | grep $1 > /dev/null if then grep $1 /etc/passwd | cut -f 5, -d : echo is logged on exit 0 else grep $1... (13 Replies)
Discussion started by: primal
13 Replies

2. UNIX for Dummies Questions & Answers

ALERT!!! ALERT!!! I messed up the UNIX!!!

Hello If you want a short description read my last thread! I have no root access anymore. No remote access! By user access i get a programm started and when i close it, i got logged off! So I guess I messed up the passwd file! is there a chance of booting a unix system (SCO-UNIX UnixWare... (15 Replies)
Discussion started by: Fwurm
15 Replies

3. Shell Programming and Scripting

change home directory by modifying passwd

hi How can I change the home directory of a user without using usermod -d command? ( by modifying /etc/passwd) (17 Replies)
Discussion started by: tjay83
17 Replies

4. HP-UX

Openspool problem when changing /etc/passwd permissions

My goal is to protect the /etc/passwd from unauthorized viewing. I wish ti change the permissions of the file to : -r--r----- 1 root bin so only root or accounts of the "bin" group could query this sensitive file. All our other processes have been ajusted to not need any info from... (16 Replies)
Discussion started by: MartinGravel
16 Replies

5. Infrastructure Monitoring

need script for passwd , can't use expect tool

Hi , as others users here , i'm searching for a script which can automate "passwd" dialog . I saw threads about "expect tool" but on my platforms , "C" product isn't installed and i'm not the admin so i can't install it. is there another way to do it , with a "simple" shell script ??? ... (35 Replies)
Discussion started by: Nicol
35 Replies

6. Shell Programming and Scripting

need script for passwd , can't use expect tool

(35 Replies)
Discussion started by: Nicol
35 Replies

7. Emergency UNIX and Linux Support

Passwd command problem

on Runnning passwd command on HPUX 11.23 I am getting pam_chauthtok: Shared object load failure. Pls help ... (13 Replies)
Discussion started by: ultimatix
13 Replies

8. Programming

C++ - Problem in asking and checking user's passwd

This is the source code: #include <pwd.h> #include <iostream> #include <string.h> using namespace std; int main() { struct passwd *user; char login="alex", password="qwertyuiop"; if ((user= getpwnam(login)) == NULL) cout << "No such user\n"; else if... (24 Replies)
Discussion started by: hakermania
24 Replies

9. UNIX for Advanced & Expert Users

psswd&shadow 2 passwd together?!!

hi, all I just started on new box where I have to diff passwd working perfectly on the very same account/user. I see that shadow was added recently (I'm not a root in there), I see 'x' in passwd. Not sure how it should work, should I change old passwd for one defined in shadow? Or it's fine to... (20 Replies)
Discussion started by: trento17
20 Replies

10. UNIX for Dummies Questions & Answers

passwd - useradd issues

hi guys I'm having these problems with these commands and I have not idea why # passwd If 'passwd' is not a typo you can run the following command to lookup the package that contains the binary: command-not-found passwd -bash: passwd: command not found # useradd temp Warning:... (15 Replies)
Discussion started by: karlochacon
15 Replies

11. Red Hat

CUPS + passwd.md5 issue

I posted the below question on the CUPS forums yesterday and have still not been able to find a good answer of why or if I can keep this from happening. I have been looking for a while now and have still not found what I am looking for. Is there a way to allow multiple users to be updating the... (13 Replies)
Discussion started by: linuxn00b
13 Replies

12. Solaris

Cannot recover root passwd through serial console mode by using CDROM

hi i cant recovery root passwd through serial console mode by using CDROM.. i tried following step but no luck in ok prompt : ok boot cdrom -s it comes single user mode i check format cmd it showing disk c1t0d0 c1t2d0 then #mount /dev/dsk/c1t0d0s0 /a #cd /a # vi /etc/shadow ( it... (13 Replies)
Discussion started by: coolboys
13 Replies

13. Shell Programming and Scripting

How to write bash script for creating user on multiple Linux hosts?

I wonder whether someone can help me with what I'm trying to achieve Basically, the objective is one script to create new user on more than 70 linux hosts if required. Everything works apart from the highlighted part. It gave me an output passwd: Unknown user name ''. when try to set... (35 Replies)
Discussion started by: fugeulu
35 Replies

14. UNIX and Linux Applications

Authentication via .htaccess and .htpasswd

I've created .htaccess and use htpasswd comand to create .htpasswd Now when I try to access my protected area I still have loging panel. I checked apache error log lile and found that there is some problem with mismatch password. I use Apache 2.2 .22 Is there some erron in creating... (25 Replies)
Discussion started by: Budrys
25 Replies

15. Shell Programming and Scripting

A script to change password for all other servers

Hey Gurus, I have this requirement to change the password for other servers remotely from one server. So, I installed public keys on all servers and wrote the following script to do the job. Something appears to be wrong with my loop, as it only changes one server and ignores the rest. I'm... (24 Replies)
Discussion started by: Hiroshi
24 Replies