Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Up: User Database


29.13.1 The Data Structure that Describes a User

The functions and data structures for accessing the system user database are declared in the header file pwd.h.

— Data Type: struct passwd

The passwd data structure is used to hold information about entries in the system user data base. It has at least the following members:

char *pw_name
The user's login name.
char *pw_passwd.
The encrypted password string.
uid_t pw_uid
The user ID number.
gid_t pw_gid
The user's default group ID number.
char *pw_gecos
A string typically containing the user's real name, and possibly other information such as a phone number.
char *pw_dir
The user's home directory, or initial working directory. This might be a null pointer, in which case the interpretation is system-dependent.
char *pw_shell
The user's default shell, or the initial program run when the user logs in. This might be a null pointer, indicating that the system default should be used.


 
 
  Published under the terms of the GNU General Public License Design by Interspire