Apple Mac OS X Server Network Card User Manual


 
Chapter 8 Working with Users and Groups 107
Modifying a User Account
You can change the value of an attribute in a user account by using dscl.
There are many attributes that can be set for users. The following table describes some
of the user account attributes you can modify using dscl:
To change a user account attribute to a new value:
1 Start the dscl tool in interactive mode, specifying the computer you are using as the
source of directory service data:
$ dscl localhost
>
2 Change the current folder to /LDAPv3/ipaddress/Users by entering the path at the
prompt:
> cd /LDAPv3/
ipaddress
/Users
Replace
ipaddress
with the IP address of your directory server. If using a NetInfo
directory domain, enter cd /NetInfo/root/Users at the prompt.
3 Authenticate as an administrator by entering the following command, replacing
adminusername with your administrator user name, and entering your administrator
password when prompted:
> auth
adminusername
4 Set the user attribute to the desired value by entering the following command,
replacing ajohnson with the user account’s short name, attribute with the name of the
attribute whose value you wish to change, and newvalue with the value:
> create
ajohnson attribute newvalue
5 Quit dscl by entering:
> quit
Attribute Description
apple-generateduid User id generated by the system.
cn User’s common name.
homeDirectory Location of the user’s Home Folder.
loginShell User’sTerminal shell.
sn User’s sir name.
LastName User’s last name.
NFSHomeDirectory Location of the user’s Home Folder.
PasswordPlus User’s password.
PrimaryGroupID User’s primary group ID.
RealName User’s name.
UserShell User’sTerminal shell.