Where Online Learning is simpler!



$ whatis passwd

passwd - change login password and password attributes

Examples:

# id

uid=0(root) gid=0(root) groups=0(root),1(other),2(bin),3(sys),4(adm),

5(uucp),6(mail),7(tty),8(lp),9(nuucp),12(daemon)

I have to be root in order to change the password for another user or root. In the example below, I am changing the password for user 'devuser'.

In Solaris you sepecify what method to use for chaning the password. In the example below, I am using the option '-r files' to update the local /etc/shadow file. The list of options you can you can provide are 'r files' for local /etc/shadow file, '-r ldap' for LDAP and '-r nis' to use the NIS depending on your company configuration and security policies in which method it authenticates.

# passwd -r files devuser

New Password:

Re-enter new Password:

passwd: password successfully changed for devuser

I used the command below in order to make sure the password for user 'devuser' does not expire.

# passwd -x -1 devuser

passwd: password information changed for devuser

In Solaris you sepecify what method to use for chaning the password. In the example below, I am using the option '-r files' to update the local /etc/shadow file.

# passwd -r files root

New Password:

Re-enter new Password:

passwd: password successfully changed for root

I used the command below in order to make sure the password for user 'root' does not expire.

# passwd -x -1 root

passwd: password information changed for root

# grep -i devuser /etc/passwd

devuser:x:101:10:WahidLutfy:/home/devuser:/bin/bash

# grep -i devuser /etc/shadow

devuser:YeyCTAA/10$RABrVPeeLflc1ciAAkmxv5ty2l0PnMY31x8xzDkK11:15061::::::

# grep -i root /etc/shadow

root:XWezV9Mp6p$vjhUtNalkjlkjlkluhB9888jkkhkkkYMWc453BpLxIc9:15061::::::


Please click on " man passwd " to see the Manual Page for this command.


Previous Home Page Next



Contact us     |      About us     |      Term of use      |      Copyright © 2000-2025 MyWebUniversity.com ™