Checking a Server User’s Name, UID, or Password

You can use the following commands to check the name, UID, or password of a user in the server’s local directory.

Note: These tasks only apply to the local directory on the server.

To see if a full name is already in use:

$ serversetup -verifyRealName "longname"

The command displays a 1 if the name is already in the directory, 0 if it isn’t.

To see if a short name is already in use:

$ serversetup -verifyName shortname

The command displays a 1 if the name is already in the directory, 0 if it isn’t.

To see if a UID is already in use:

$ serversetup -verifyUID userid

The command displays a 1 if the UID is already in the directory, 0 if it isn’t.

To test a user’s password:

$ serversetup -verifyNamePassword shortname password

The command displays a 1 if the password is good, 0 if it isn’t.

To view the names associated with a UID:

$ serversetup -getNamesByID userid

No response means UID not valid.

To generate the default UNIX short name for a user long name:

$ serversetup -getUNIXName "longname"

62

Chapter 7 Working With Users and Groups

Page 62
Image 62
Apple oxs manual Checking a Server User’s Name, UID, or Password