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