To set the password policy of an individual user to change their password:

$ pwpolicy -n /LDAPv3/ldap.apple.com -aadminusername -padminpassword

-u usertochange -setpolicy "newPasswordRequired=1"

Parameter

Description

ldap.apple.com

Location of the LDAP directory.

 

 

adminusername

User name of an administrator.

 

 

adminpassword

The administrator password (omit this to prompt for the password)

 

 

usertochange

User name of the user whose password is changing.

 

 

newPasswordRequired

Set to 1 to prompt the user to enter a new password.

 

 

See the pwpolicy man page for more information.

Finding User Account Information

The lookupd daemon acts as an information broker and cache. It is called by various routines in the system framework to find information about user accounts, groups, printers, email aliases and distribution lists, computer names, Internet addresses, and several other kinds of information. You can use it interactively to find out user account information.

To query for a user by name:

$ lookupd -d

> userWithName: admin

To see a list of all the different commands that run with lookupd:

$ lookupd -d

>?

To get a description of a specific command that you can run with lookupd:

Access the help prompt and enter the command name.

$ lookupd -d

>help

help> [command]

See the lookupd man page for more information.

Chapter 8 Working with Users and Groups

131

Page 131
Image 131
Apple Mac OS X Server manual Finding User Account Information, See the pwpolicy man page for more information