]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/newuser
merge
[plan9front.git] / sys / man / 8 / newuser
1 .TH NEWUSER 8
2 .SH NAME
3 newuser \- adding a new user
4 .SH SYNOPSIS
5 .B /sys/lib/newuser
6 .SH DESCRIPTION
7 To establish a new user on Plan 9, add the user to
8 .B /adm/users
9 by running the
10 .I uname
11 command on the console of the file server
12 (see
13 .IR users (6)).
14 Next, give the user a password using
15 .I auth/changeuser
16 on the console of the authentication server (see
17 .IR auth (8)).
18 At this point, the user can bootstrap a terminal using the new name and
19 password.
20 The terminal will only get as far as running
21 .BR rc ,
22 however, as no
23 .B profile
24 exists for the user.
25 .PP
26 The
27 .IR rc (1)
28 script
29 .B /sys/lib/newuser
30 sets up a sensible environment for a new user of Plan 9.
31 Once the terminal is running
32 .BR rc ,
33 type
34 .IP
35 .EX
36 /sys/lib/newuser
37 .EE
38 .PP
39 to build the necessary directories in
40 .BR /usr/$user ,
41 create
42 .BR /mail/box/$user/mbox ,
43 .BR /cron/$user/cron ,
44 a reasonable initial profile in
45 .BR /usr/$user/lib/profile
46 and
47 plumbing rules in
48 .BR /usr/$user/lib/plumbing
49 (see
50 .IR plumber (4)).
51 The script then runs the profile which, as its last step, brings up
52 .IR rio (1).
53 At this point the user's environment is established and running.
54 (There is no need to reboot.)
55 It may be prudent at this point to run
56 .IR passwd (1)
57 to change the password, depending on how the initial password was chosen.
58 .PP
59 The
60 .B profile
61 built by
62 .B /sys/lib/newuser
63 looks like this:
64 .IP
65 .EX
66 bind -a $home/bin/rc /bin
67 bind -a $home/bin/$cputype /bin
68 bind -c tmp /tmp
69 font = /lib/font/bit/pelm/euro.9.font
70 switch($service){
71 case terminal
72         plumber
73         upas/fs
74         echo -n accelerated > '#m/mousectl'
75         echo -n 'res 3' > '#m/mousectl'
76         prompt=('term% ' '      ')
77         fn term%{ $* }
78         exec rio
79 case cpu
80         if (test -e /mnt/term/mnt/wsys) {
81                 # rio already running
82                 wsys = /mnt/term^`{cat /mnt/term/env/wsys}
83                 bind -a /mnt/term/mnt/wsys /dev
84                 echo -n $sysname > /dev/label
85         }
86         bind /mnt/term/dev/cons /dev/cons
87         bind /mnt/term/dev/consctl /dev/consctl
88         bind -a /mnt/term/dev /dev
89         prompt=('cpu% ' '       ')
90         fn cpu%{ $* }
91         upas/fs
92         news
93         if (! test -e /mnt/term/mnt/wsys) {
94                 # cpu call from drawterm
95                 font=/lib/font/bit/pelm/latin1.8.font
96                 auth/factotum
97                 plumber
98                 exec rio
99         }
100 case con
101         prompt=('cpu% ' '       ')
102         news
103 }
104 .EE
105 .PP
106 Sites may make changes to
107 .B /sys/lib/newuser
108 that reflect the properties of the local environment.
109 .SH "SEE ALSO"
110 .IR passwd (1),
111 .IR rio (1),
112 .IR namespace (4),
113 .IR users (6),
114 .IR auth (8).