year8:*:101:This will create a group called year8 with a numerical group-id (gid) of 101. The gid should be unique. By default, all users are created with a gid of 100. If you have build 31 or earlier, there is no group defined in /etc/group for this gid which means that there will be no name associated with that gid. Applying the hotfixes will name this group users. If you create a user which is in a different group (e.g. staff), this will allow you set differential permissions. For example, the system users ncadmin and wwware in the group wheel. A file can be created that belongs to www and wheel and has owner read/write, group read-only, but no public access. To do this, we could create a file and then set the ownership:
chown www.wheel myfilenameWe can then set the permissions:
chmod 640 myfilenameor:
chmod u+rw,g+r-w,o-rw myfilenameTyping ls -l shows the following:
-rw-r----- 1 www wheel .................. etcThis shows that the file is owner read/write (rw-), group read (r--) and no access to public (---). It is also owned by www and the group wheel. User www (in group wheel) will be able to read and write the file (as www owns the file). User ncadmin (also in group wheel) will be able to read, but not write to the file. User template (in group users) will no be able to read or write to the file.
Similar behaviour can be performed with directories. N.B. Altering permission from RISCOS groups the group and public access together
The UNIX permissions system is straightforward (it is much less complex than NT for example) and logical, however I recommend reading any UNIX introductory book to get a full grounding (coupled with experimentation).
<username>,<password>,<Real name>
This will copy the shell and home directory of user template and create a new home directory in /usr/export/home. The users will be put in the users group (group-id 100). To override the group, use the following syntax:
addusers -g <group> <CSV file name>If you use a group name, it should be present in the /etc/group file.
To copy the home directory and shell from a different user, type the desired user name after the filename of the CSV file.
To alter where the home directories are created, put the pathname after user to be copied from. N.B. If you specify a different directory, you must also specify the user to use as a template. If the directory doesn't exist, you will be given the option of creating the directory, creating the users without home directories or exiting the script. It is sometimes useful to create users without home directories so that they have an email address, even if you are using an NT server for the user areas.
For example:
addusers -g users 1997entry.csv template /usr/export/home/1997entry
addusers -g staff staff.csv template /usr/export/home/staff
To fix the problem, you will need to:
cp /etc/master.passwd /etc/master.passwd.bak
tar -czf /cdrom/buildrpc/sets/xem/aa_etc.00 ./etc/master.passwd