Precedence Network Computer and NetManager
User management

  1. How do I use groups on the NetManager?

    A full introduction is given below, but if you have installed all the hotfixes, you can define/list/delete groups, create users within those group and move users between groups from the web-based user administration pages. This means you are unlikely to ever have to get your hands dirty

    Files on a UNIX filesystem have both an owner and a group associated with then. In addition, the permissions scheme allow you to independently set read/write/execute access for each of owner/group/others. Finally, each user belongs to at least one group which is defined in the password file. These three properties in conjunction allow you to do things like allow all staff to read a file, but no pupils. I recommend reading any UNIX introductory book to get a full grounding. You can check which group(s) a user belongs to by typing group <user name>. All the groups are defined in /etc/group. To create a new group, simply add a line like the following:
    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 myfilename
    We can then set the permissions:
    chmod 640 myfilename
    or:
    chmod u+rw,g+r-w,o-rw myfilename
    Typing ls -l shows the following:
    -rw-r-----  1 www	wheel	.................. etc
    
    This 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).

    Contents


  2. How do I use the addusers script?

    N.B. Please apply the latest hotfix to get a later version of addusers
    In it's simplest form, you simply type addusers followed by the filename of a CSV file which is in the format:

    <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

    Contents


  3. I get a memory exhausted error when using delusers

    If you are deleting more than about 1000 users, you will need to type unlimit prior to running the delusers command otherwise the process will only be allocated a maximum of 16MB.

    Contents


  4. All the system users seem to have disappeared

    Symptoms: When you log in as root or ncadmin with the correct password, it just says login incorrect.
    This is serious. You are using very old version of the user management scripts. Always apply the latest hotfixes as they are released!

    To fix the problem, you will need to:

    1. Switch the machine off (you won't be able to log as root)
    2. Reboot the machine holding down Alt to boot into RISCOS
    3. Click on the RiscBSD icon on the iconbar
    4. Select the Single User mode option
    5. Click on Boot
    6. At the "Enter pathname of shell..." line, press RETURN
    7. Type fsck
    8. Type mount -a
    9. Back up the old user database by typing
      cp /etc/master.passwd /etc/master.passwd.bak
    10. Put in an NCManager CD
    11. Type mount /cdrom
    12. Extract the password files by typing
      tar -czf /cdrom/buildrpc/sets/xem/aa_etc.00 ./etc/master.passwd
    13. Rebuild the databases by typing pwd_mkdb -p /etc/master.passwd
    14. Type reboot to reboot the machine
    15. When the machine has rebooted, log in as root
    16. Type cat /etc/master.passwd.bak >> /etc/master.passwd to add the old password list onto the new one
    17. Type joe /etc/master.passwd to edit the user database. Remove any duplicate users (Ctrl-Y deletes a line).
    18. Type Ctrl-K followed by X to save out the user database
    19. Rebuild the databases by typing pwd_mkdb -p /etc/master.passwd
    20. The machine should now be OK

    Contents

Next (email)