(no commit message)
[openafs-wiki.git] / ExampleUSSTemplates.mdwn
1 # <a name="Example uss Templates"></a> Example uss Templates
2
3 This section describes example templates for the basic and full account types (the template for an authentication-only account is empty).
4
5 The first example creates a basic account. It contains two G instructions and a V instruction that defines the volume name, file server machine, partition, quota in kilobytes, mount point, home directory owner, and home directory access control list. In the ABC Corporation cell, a suitable template is:
6
7        G /afs/.abc.com/usr1
8        G /afs/.abc.com/usr2
9        V  user.$USER  $SERVER.abc.com  /vicep$PART  5000  $AUTO/$USER   $UID $USER all staff rl
10
11 When issuing the uss add command with this type of template, provide the following arguments:
12
13 - -user to specify the username for the $USER variable
14
15 - -server to specify the unique part of the file server machine name for the $SERVER variable
16
17 - -partition to specify the unique part of the partition name for the $PART variable
18
19 The Protection Server automatically assigns an AFS UID for the $UID variable, and the G instructions provide a value for the $AUTO variable.
20
21 The following example template file creates a full account in the ABC Corporation cell. The following sections about each type of instruction describe the effect of the examples. Note that the V and E instructions appear on two lines each only for the sake of legibility.
22
23     #
24     # Specify the available grouping directories
25     #
26     G /afs/.abc.com/usr1
27     G /afs/.abc.com/usr2
28     #
29     # Create the user's home volume
30     #
31     V user.$USER $SERVER.abc.com /vicep$PART 5000  afs/.abc.com/$AUTO/$USER         $UID $USER all abc:staff rl
32     #
33     # Create directories and files for mail
34     #
35     D $MTPT/.MESSAGES 0700 $UID $USER all abc:staff none
36     D $MTPT/.Outgoing 0700 $UID $USER rlidwk postman rlidwk
37     D $MTPT/Mailbox 0700 $UID $USER all abc:staff none system:anyuser lik
38     #
39     # Here are some useful scripts for login etc.
40     #
41     F $MTPT/.Xbiff 0755 $UID /afs/abc.com/admin/user/proto
42     F $MTPT/.Xresources 0644 $UID /afs/abc.com/admin/user/proto
43     F $MTPT/.Xsession 0755 $UID /afs/abc.com/admin/user/proto
44     F $MTPT/.cshrc 0755 $UID /afs/abc.com/admin/user/proto
45     F $MTPT/.login 0755 $UID /afs/abc.com/admin/user/proto
46     F $MTPT/.logout 0755 $UID /afs/abc.com/admin/user/proto
47     F $MTPT/.twmrc 0644 $UID /afs/abc.com/admin/user/proto
48     F $MTPT/preferences 0644 $UID /afs/abc.com/admin/user/proto
49     #
50     # Make a passwd entry
51     #
52     E /afs/.abc.com/common/etc/newaccts/passwd_$USER 0644 root      "$USER:X:$UID:11:$NAME:$MTPT:/bin/csh"
53     #
54     # Put in the standard password/authentication checks
55     #
56     A $USER 250 noreuse 9 25
57     #
58     # Create and mount a public volume for the user
59     #
60     X "create_public_vol $USER $1 $2"
61     #
62     # Here we set up the symbolic link to public directory
63     #
64     S /afs/abc.com/public/$USER $MTPT/public
65
66 Example execution command:
67
68 uss add -user joe -admin admin -server server.example.com -uid 2001 -part a -dryrun
69
70 -- Craig Cook - 31 Mar 2005