getpwuid man page on NeXTSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
NeXTSTEP logo
[printable version]


GETPWUID(3)							   GETPWUID(3)

NAME
       getpwuid,  getpwnam,  getpwent,	setpwent,  endpwent,  setpwfile - user
       database access

SYNOPSIS
       #include <sys/types.h>
       #include <pwd.h>

       struct passwd *getpwuid(uid_t uid)

       struct passwd *getpwnam(const char *name)

(ALSO AVAILABLE IN BSD)
       struct passwd *getpwent(void);

       void setpwent(void);

       void endpwent(void);

       void setpwfile(char *name);

DESCRIPTION
       The getpwuid and getpwnam functions both return a pointer to  a	passwd
       structure  containing  an  entry	 from  the  system's  user  (password)
       database with a matching numeric user ID (uid) or  a  user  login  name
       (name).

       The  passwd structure is defined in the header <pwd.h> and includes the
       following members:

	      Member Type    Member Name	 Description

	      char *	     pw_name		 Login name.

	      uid_t	     pw_uid		 Numerical user ID.

	      gid_t	     pw_gid		 Numerical group ID.

	      char *	     pw_dir		 Pathname of home directory.

	      char *	     pw_shell		 Initial user (shell) program.

	      char *	     pw_passwd		 User password. (BSD only; not
						 POSIX-compliant)

       The  passwd  structure may contain more implementation-specific members
       than those listed here;see passwd(5) for more information.

       The BSD routines setpwent, getpwent, endpwent,  and  setpwfile  may  be
       used  to	 scan  the  user  database  sequentially.  setpwent resets the
       current user password structure to the first in the database,  getpwent
       reads and returns the next user password entry, and endpwent closes the
       user password database  when  processing	 is  complete.	 In  addition,
       setpwfile may be called to set the database to that given in file name,
       which is a file in  passwd(5)  format.	Setpwfile  doesn't  close  the
       previous password file; endpwent should be used before setpwfile.

NOTES
       The value returned points to a static area; if the information is to be
       saved, it must be copied.

RETURN VALUE
       A NULL pointer is returned on error or if the requested	entry  is  not
       found.

FILES
       /etc/passwd - if NetInfo is not running, or if YellowPages is enabled.

SEE ALSO
       getlogin(3), getgrent(3), lookupd(8), netinfo(5), passwd(5)

7th Edition			August 1, 1992			   GETPWUID(3)
[top]

List of man pages available for NeXTSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net