Go to the first, previous, next, last section, table of contents.

rootMakeUser { [ proposedDbfileName | -> [ user | }

Function: rootMakeUser
file: job.t
package: muf
status: alpha

The rootMakeUser function creates and returns a new instance of Class User. This instance owns (only) itself. A new dbfile is created for the new user: the name of the new dbfile is as close to proposedDbfileName as practical.

In the interests of keeping the C-coded kernel as policy-free as possible, rootMakeUser does nothing beyond the above. However, in the interest of sanity, it is recommended that:

  1. A User instance be created only after prompting for a name and passphrase and verifying that the name is not present in .u.
  2. The new User's name and passphrase should be set immediately.
  3. The new User instance be immediately entered into .u under its name.

If several jobs may be entering new users, a lock should of course be used to protect .u. See section withLockDo.

Newly created User objects default to having .lib as their library of packages (user$s.lib), and .lib.muf as their default package (usr$s.package). Since they won't own either, they won't be able to create symbols in their accessable packages nor create new packages: You will normally want to create a new object as their usr$s.lib, copy into it the system packages you feel to be appropriate, and most likely also create them a personal package which they own (probably giving it their login name as a name) and point their user$s.package to it.

A higher level wrapper function exists to do much of this work: See section rootMakeAUser.

Go to the first, previous, next, last section, table of contents.