newuser 2.3 KB

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