ULOS Manual Pages - users(2) | Back

NAME
  users - user management

DESCRIPTION
  This API provides facilities for simple managements of users under Cynosure.

  All functions return nil and an error message on failure.

FUNCTIONS
  prime(data:table): boolean
    Used internally.  Undocumented.

  authenticate(uid:number, pass:string): boolean
    Checks whether the credentials provided are valid.

  exec_as(uid:number, pass:string, func:function[, pname:string][, wait:boolean])
    Spawns a new process to execute the provided func as the user specified by uid.  If pname is specified the process name will be set to it, and if wait is specified then exec_as will return the result of process(2).awaiting the new process.
  
  get_uid(uname:string): number
    Returns the user ID associated with the specified username uname.

  attributes(uid:number): table
    Returns the attributes of the specified uid:

      {
        name = string,
        home = string,
        shell = string,
        acls = number
      }

    Perhaps the least self-explanatory field is acls, which contains all the user's permissions OR'd together.

  usermod(attributes:table): boolean
    Changes user attributes.  The provided table of attributes should have a form identical to that returned by the attributes function, but with the ACL data as a table where [acl_name] = true, and with a UID and password field if not modifying the current user.

    The specified user will be created if it does not exist.

    Use of this function can be seen in passwd(1).

  remove(uid:number): boolean
    Tries to remove the user whose ID is uid.

COPYRIGHT
  Cynosure kernel copyright (c) 2021 Ocawesome101 under the DSLv2.

REPORTING BUGS
  Bugs should be reported at https://github.com/ocawesome101/oc-cynosure/issues.