octave: Password Database Functions

 
 36.9 Password Database Functions
 ================================
 
 Octave’s password database functions return information in a structure
 with the following fields.
 
 ‘name’
      The user name.
 
 ‘passwd’
      The encrypted password, if available.
 
 ‘uid’
      The numeric user id.
 
 ‘gid’
      The numeric group id.
 
 ‘gecos’
      The GECOS field.
 
 ‘dir’
      The home directory.
 
 ‘shell’
      The initial shell.
 
    In the descriptions of the following functions, this data structure
 is referred to as a PW_STRUCT.
 
  -- : PW_STRUCT = getpwent ()
      Return a structure containing an entry from the password database,
      opening it if necessary.
 
      Once the end of the data has been reached, ‘getpwent’ returns 0.
 
DONTPRINTYET       See also: Seesetpwent XREFsetpwent, *noteendpwent:
DONTPRINTYET       See also: Seesetpwent XREFsetpwent, Seeendpwent

      XREFendpwent.
 
  -- : PW_STRUCT = getpwuid (UID).
      Return a structure containing the first entry from the password
      database with the user ID UID.
 
      If the user ID does not exist in the database, ‘getpwuid’ returns
      0.
 
      See also: Seegetpwnam XREFgetpwnam.
 
  -- : PW_STRUCT = getpwnam (NAME)
      Return a structure containing the first entry from the password
      database with the user name NAME.
 
      If the user name does not exist in the database, ‘getpwname’
      returns 0.
 
      See also: Seegetpwuid XREFgetpwuid.
 
  -- : setpwent ()
      Return the internal pointer to the beginning of the password
      database.
 
DONTPRINTYET       See also: Seegetpwent XREFgetpwent, *noteendpwent:
DONTPRINTYET       See also: Seegetpwent XREFgetpwent, Seeendpwent

      XREFendpwent.
 
  -- : endpwent ()
      Close the password database.
 
DONTPRINTYET       See also: Seegetpwent XREFgetpwent, *notesetpwent:
DONTPRINTYET       See also: Seegetpwent XREFgetpwent, Seesetpwent

      XREFsetpwent.