passwd

Contains information about a local user.

Service:File and Directory I/O

Structure

  #include <pwh.h>
  
  struct passwd{   
     uid_t    pw_uid;
     uid_t    pw_spare1;
     gid_t    pw_gid;
     gid_t    pw_spare2;
     char    *pw_name; 
     char    *pw_dir; 
     char    *pw_shell; 
     char    *pw_LDAPName;
     char    *pw_passwd;
     char    *pw_gecos; 
     char    *pw_comment;
     char     pw_spare3[4];
     time_t   pw_change;
     time_t   pw_expire;
     char     pw_spare4[8];
     char     pw_spare5[16];
  };
  

Fields

pw_uid

Specifies the user ID.

pw_spare1

Reserved.

pw_gid

Specifies the group ID.

pw_spare2

Reserved

pw_name

Points to the relative distinguished name of the user.

pw_dir

Points to the user's home directory.

pw_shell

Points to the name of the default shell.

pw_LDAPName

Points the distinguished name, in LDAP format.

pw_passwd

Contains a NULL pointer.

pw_gecos

Points to general information.

pw_comment

Points to a comment, if one has been made.

pw_spare3

Reserved.

pw_change

Specifies when the user must change the password.

pw_expire

Specifies when the account will expire and be deactivated.

pw_spare4

Reserved.

pw_spare5

Reserved.