beautypg.com

Apple AppleShare 3.0 Users and Groups Programming Interface User Manual

Page 2

background image

- UGOpenFile

- UGCloseFile

- UGCreateFile

Users

The following attributes are assigned to each user (except the guest user): a

user ID, a user name, a password, and user flags. These attributes are

assigned when the user is created with the UGNewUser function. The user ID

cannot be changed. The user name can be changed with the UGRenameUser

function.

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 password and user flags can be read or changed with the UGGetUserInfo

or UGSetUserInfo function, respectively. There are five user flags:

IACEnabled Set if interapplication communication (IAC) is enabled for the

user.

LoginEnabled Set if file server login is enabled for the user.

SuperUser Set if the user is a system administrator user (that is, the

system owner, known in AppleShare terminology as the

superuser). Only one superuser is allowed under Macintosh File

Sharing.

NoChangePwd Set if the user cannot change his or her password from a

remote workstation.

GetNewPwd Set if the file server should demand a new password from the

user at the next login. This flag is available only on the

AppleShare File Server 3.0. This flag must be clear for

Macintosh File Sharing.

Two kinds of users are treated differently than other users: the guest user

and the system administrator user. The Guest attributes are maintained as

part of the server characteristics and can be read or set with the

UGGetULInfo or UGSetULInfo functions, respectively. The record with ID 0

contains this information and is automatically created along with a new users

and groups file by the UGCreateFile function.

The administrator user's user ID is always 1. You can use either of two

methods to set up the administrator user: You can have your application

create the administrator user with the UGNewUser function, or you can let the

file server create the administrator user for you. The first time either

Macintosh File Sharing or the AppleShare Admin program accesses a users and

groups file, it checks for the administrator user. If the administrator user

is not found, it is created and given the "owner name" found in the 'STR '

resource ID -16096 (the name of the person who "owns" the computer), which

resides in the System file. If the administrator user is found and its name

does not match the owner name in the System file, then the name of the

administrator user is put into the 'STR ' resource ID -16096 so that all