user-management.md (1297B)
1 User and Group Management 2 ========================= 3 4 User account and group membership information are stored under `etc/users/`. 5 6 A user account consists of a directory under `etc/users/` that contains files with that users account information, the only required file is `password` containing a password for the user. For example: 7 8 % ls etc/users/ 9 eekee uriel yosyp 10 % cat etc/users/uriel/password 11 mypass 12 13 Users and groups share the same namespace, you can create a group the same way you create a user but instead of a 'password' file adding a 'members' file containing the names of the group members, one per line. 14 15 A 'user-group' directory can contain both a password and members file, in which case it will act concurrently as a user and as a group. 16 17 The group 'admin' is 'built-in' and any members in that group will have admin privileges for most werc apps by default. 18 19 Example 20 ------- 21 22 To create a user called [glenda](http://glenda.cat-v.org) that is a member of the group `rabbits` you can do: 23 24 % mkdir etc/users/glenda/ 25 % echo carrot > etc/users/glenda/password 26 % mkdir -p etc/users/rabbits 27 % echo glenda >> etc/users/rabbits/members 28 29 Utils 30 ----- 31 32 The script at bin/aux/addwuser.rc allows you to even more trivially add users. 33 34 addwuser.rc user_name user_pass [groups ...] 35 36