Mac OS X 10.6 Server Admin: Automatically Disconnecting Idle Users from the AFP Server
You can set AFP service to disconnect users who have not used the server for a period of time.
-
Open Server Admin and connect to the server.
-
Click the triangle at the left of the server.
The list of services appears.
-
From the expanded Servers list, select AFP.
-
Click Settings, then click Idle Users.
-
To enable client computers to reconnect after sleeping, select “Allow clients to sleep __ hours” and enter the number of hours clients can sleep and still automatically reconnect to the server.
Although the server disconnects sleeping clients, the clients’ sessions are maintained for the specified period. When a user resumes work within that time, the client is reconnected with no apparent interruption.
-
To specify the idle time limit, select “Disconnect idle users after __ minutes” and enter the number of minutes after which an idle computer should be disconnected.
A sleeping Mac OS X v10.2 (or later) client can resume work on open files within the limits of the “Allow clients to sleep” setting.
-
To prevent types of users from being disconnected, select them under “Except.”
-
In the “Disconnect Message” field, enter the message you want users to see when they are disconnected.
If you don’t enter a message, a default message appears stating that the user has been disconnected because the connection has been idle.
-
Click Save.
-
To change AFP service Idle User settings:
$ sudo serveradmin settingsafp:clientSleepOnOff = valueafp:clientSleepTime = valueafp:idleDisconnectOnOff = valueafp:idleDisconnectTime = valueafp:idleDisconnectFlag:guestUsers = valueafp:idleDisconnectFlag:adminUsers = valueafp:idleDisconnectFlag:registeredUsers = valueafp:idleDisconnectFlag:usersWithOpenFiles = valueafp:idleDisconnectMsg = "value"Control-D
| Parameter | Description |
|---|---|
| clientSleepOnOff | Allow client computers to sleep. Default = yes |
| clientSleepTime | Time (in hours) that clients are allowed to sleep. Default = 24 |
| idleDisconnectOnOff | Enable idle disconnect. Default = no |
| idleDisconnectTime | Idle time (in minutes) allowed before disconnect. Default = 10 |
| idleDisconnectFlag: guestUsers | Enforce idle disconnect for guest users. Default = yes |
| idleDisconnectFlag: adminUsers | Enforce idle disconnect for administrator users. Default = yes |
| idleDisconnectFlag: registeredUsers | Enforce idle disconnect for registered users. Default = yes |
| idleDisconnectFlag: usersWithOpenFiles | Enforce idle disconnect for users with open files. Default = yes |
| idleDisconnectMsg | Idle disconnect message. Default = "" |
For more information about command-line parameters for AFP, see AFP Parameters. For information about serveradmin, see its man page.