3Authenticate as an administrator by entering the following command, replacing adminusername with your administrator user name, and entering your administrator password when prompted:

> auth adminusername

4Remove the group by entering the following command, replacing officegroup with the group account’s short name:

> delete officegroup

5Quit dscl by entering:

> quit

Adding a User to a Group

You can add users to a group using the dscl tool.

To add a user to a group:

1Start the dscl tool in interactive mode, specifying the computer you are using as the source of directory service data:

$ dscl localhost

>

2Change the current folder to /LDAPv3/ipaddress/Groups by entering the path at the prompt:

> cd /LDAPv3/ipaddress/Groups

Replace ipaddress with the IP address of your directory server. If using a NetInfo directory domain, enter cd /NetInfo/root/Users at the prompt.

3Authenticate as an administrator by entering the following command, replacing adminusername with your administrator user name, and entering your administrator password when prompted:

> auth adminusername

4Add the user to the group by entering the following command, replacing ajohnson with the short name of the user account and officegroup with the short name of the group account:

> append admin Member adminusername

This creates an administrator user, but it does not add the GUID (globally unique identifier) of the administrator user to the group account. This may cause security and compatibility issues.

5Add the administrator user to the admin group.

> append admin GroupMembers guid

Chapter 8 Working with Users and Groups

113

Page 113
Image 113
Apple Mac OS X Server Adding a User to a Group, You can add users to a group using the dscl tool, To add a user to a group