beautypg.com

Apple AppleShare 3.0 Users and Groups Programming Interface User Manual

Page 3

background image

parts of the system use the same administrator name. Once the administrator

user is created, it cannot be deleted or renamed by means of UGLibrary; it

can only be renamed through the System 7 Sharing Setup control panel or by

means of AppleShare Admin.

In addition to returning attribute information on users, the UGGetUserInfo

function can be used to enumerate all users in the users and groups file or

all users in a group, to provide a list of all groups of which a user is a

member, and to get a user's primary group.

The UGDeleteUser function can be used to delete all users except the guest

user and the administrator user. However, the guest user and administrator

user can be disabled with UGSetULInfo and UGSetUserInfo, respectively.

The UGAuthenticateUser function provides a way to authenticate a user's

password. UGLibrary does not provide a way to read user passwords.

The following UGLibrary functions are relevant to users and are described in

detail later in this document:

- UGNewUser

- UGDeleteUser

- UGRenameUser

- UGGetUserInfo

- UGSetUserInfo

- UGAuthenticateUser

Groups

Each group has two attributes, its group ID and its name, which are assigned

when the group is created with UGNewGroup. The group ID cannot be changed.

The group name can be changed with UGRenameGroup.

The UGGetGroupInfo function can be used to enumerate all groups in the users

and groups file, and to map a group name to a group ID or map a group ID to a

group name. Groups can be deleted with the UGDeleteGroup function, and

renamed with the UGRenameGroup function.

You use the UGAssignUserToGroup function to make a user a member of a group.

The UGAssignUserToGroup function also lets you assign a user's primary group.

(The primary group is used by the AppleShare File Server 3.0 when Apple II

mode is on. The primary group is also the group assigned access privileges to

a folder when a folder is created remotely.) The UGDeleteUserFromGroup

function is used to remove a user from a group.

Note UGLibrary does not allow user or group names to contain the colon (:)

character. User or group names can contain the slash (/) character, but you

should avoid using such names because they are not compatible with the Apple

II family of computers.

The following UGLibrary functions are relevant to groups and are described in

detail later in this document: