Actions
How To Add Users to the Kerberos/AFS Servers¶
The steps in this guide should work on any machine with properly setup Kerberos and AFS clients: AFS_Clients
It is also possible to ssh login to gryla.dev.objid.net and do everything there.
Add a Kerberos principal for the new user¶
- use the kerberos administration tool (for admin password see Kerberos):
$ kadmin -p root/admin Authenticating as principal root/admin with password. Password for root/admin@DEV.RU.IS: kadmin:
- add new user principle
addprinc -policy user <USERNAME>
- log off
quit
Use the newuser-batch.sh script¶
In the devnet project under Machines/AFSCELL1 there is a script called newuser-batch.sh. This takes care of most of the AFS creation opetations.
It still needs some work to be robust.
Add user to AFS and create a home directory¶
- get AFS admin privileges (see Kerberos for admin password):
$ kinit root/admin; aklog
- check if you have the token:
$ tokens Tokens held by the Cache Manager: User's (AFS ID 1) tokens for afs@dev.ru.is [Expires Mar 31 01:16] --End of list--
- create AFS user (use the same user id!)
$ pts createuser <USERNAME>
- create a volume for the user (20000 is the quota in kB)
$ vos create gryla.dev.objid.net a user.<USERNAME> 20000
- check with
vos examine user.USERNAME
- mount the volume to a proper location
- we will use the hashed schema with <DIR>=<FIRSTLETTER>/<FIRSTLETTER><SECONDLETTER>, where <FIRSTLETTER> and <SECONDLETTER> are the first and second letter of the user id
$ cd /afs/dev.ru.is/user $ mkdir -p <DIR> $ fs mkm <DIR>/<USERNAME> user.<USERNAME> -rw
- we will use the hashed schema with <DIR>=<FIRSTLETTER>/<FIRSTLETTER><SECONDLETTER>, where <FIRSTLETTER> and <SECONDLETTER> are the first and second letter of the user id
- set permissions to allow the user full access
$ fs sa <DIR>/<USERNAME> <USERNAME> all
- check permissions
$ fs la <DIR>/<USERNAME> Access list for <DIR>/<USERNAME> is Normal rights: system:administrators rlidwka <USERNAME> rlidwka
- check if it works (switch from admin to <USERNAME> and try to create and read a file)
$ unlog; kdestroy $ kinit <USERNAME>; aklog Password for <USERNAME>@DEV.RU.IS: $ cd /afs/dev.ru.is/user/<DIR>/<USERNAME> $ echo IT WORKS > test $ cat test IT WORKS $ rm test
Updated by Joseph Foley over 9 years ago · 1 revisions