130

To change a user’s password:

$ pwpolicy -n /LDAPv3/ipaddress -aadminusername -uusertochange

-setpassword newpassword

Parameter

Description

ipaddress

Location of the LDAP directory.

 

 

adminusername

User name of an administrator.

 

 

usertochange

User name of the user whose password is changing.

 

 

newpassword

The password the user is changing to.

 

 

To view the global password policy:

$ pwpolicy -getglobalpolicy

To set the minimum password length to 5 characters:

$ pwpolicy -n /LDAPv3/ipaddress-a adminusername -setglobalpolicy

“minChars=5

Parameter

Description

ipaddress

Location of the LDAP directory.

 

 

adminusername

User name of an administrator.

 

 

minChars

Minimum number of characters in the password.

 

 

To set a more secure global password policy:

$ pwpolicy -n /LDAPv3/ipaddress-a adminusername -setglobalpolicy

"minChars=6 usingHistory=4 requiresNumeric=1

maxMinutesUntilChangePassword=43200"

This sets the global password policy for all users requiring:

Âthe password to have a minimum of six characters

Âthe users cannot reuse a password from the previous four passwords

Âthe password must contain at least one number

Âthe password must be changed every thirty days

Parameter

Description

ipaddress

Location of the LDAP directory.

 

 

adminusername

User name of an administrator.

 

 

minChars

Minimum number of characters in the password.

 

 

usingHistory

Sets the number of previous passwords that the user is not allowed

 

to reuse.

 

 

requiresNumeric

Number of numeric characters that must be in the password.

 

 

maxMinutesUntilChangePas

Number of minutes until a password must be changed.

sword

 

 

 

Chapter 8 Working with Users and Groups

Page 130
Image 130
Apple Mac OS X Server manual To change a user’s password, To view the global password policy