106

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 domain.

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

To see if a full name is already in use:

$ sudo /System/Library/ServerSetup/serversetup -verifyRealName "longname"

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

To see if a short name is already in use:

$ sudo /System/Library/ServerSetup/serversetup -verifyName shortname

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

To see if a UID is already in use:

$ sudo /System/Library/ServerSetup/serversetup -verifyUID uid

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

To test a user’s password:

$ sudo /System/Library/ServerSetup/serversetup -verifyNamePassword shortname

password

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

To view the names associated with a UID:

$ sudo /System/Library/ServerSetup/serversetup -getNamesByID uid

If you don’t receive a response, the UID is not valid.

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

$ sudo /System/Library/ServerSetup/serversetup -getUNIXName "longname"

Note: Mac OS X Server provides the net tool, which is essentially a clone of the Windows net command. The net tool enables administrators to perform advanced customization of the PDC and mapping domain privileges to UNIX groups. See the net man page for more information.

Chapter 8 Working with Users and Groups

Page 106
Image 106
Apple Mac OS X Server manual Checking a Server User’s Name, UID, or Password