Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

putpwent(3c) [sunos man page]

putpwent(3C)						   Standard C Library Functions 					      putpwent(3C)

NAME
putpwent - write password file entry SYNOPSIS
#include <pwd.h> int putpwent(const struct passwd *p, FILE *f); DESCRIPTION
The putpwent() function is the inverse of getpwent(). See getpwnam(3C). Given a pointer to a passwd structure created by getpwent(), getp- wuid(), or getpwnam(), putpwent() writes a line on the stream f that matches the format of /etc/passwd. RETURN VALUES
The putpwent() function returns a non-zero value if an error was detected during its operation. Otherwise, it returns 0. USAGE
The putpwent() function is of limited utility, since most password files are maintained as Network Information Service (NIS) files that cannot be updated with this function. For this reason, the use of this function is discouraged. If used at all, it should be used with put- spent(3C) to update the shadow file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getpwnam(3C), putspent(3C), attributes(5) SunOS 5.10 29 Dec 1996 putpwent(3C)

Check Out this Related Man Page

putspent(3C)						   Standard C Library Functions 					      putspent(3C)

NAME
putspent - write shadow password file entry SYNOPSIS
#include <shadow.h> int putspent(const struct spwd *p, FILE *fp); DESCRIPTION
The putspent() function is the inverse of getspent(). See getspnam(3C). Given a pointer to a spwd structure created by getspent() or get- spnam(), putspent() writes a line on the stream fp that matches the format of /etc/shadow. The spwd structure contains the following members: char *sp_namp; char *sp_pwdp; long sp_lstchg; long sp_min; long sp_max; long sp_warn; long sp_inact; long sp_expire; unsigned long sp_flag; If the sp_min, sp_max, sp_lstchg, sp_warn, sp_inact, or sp_expire member of the spwd structure is -1, or if sp_flag is 0, the correspond- ing /etc/shadow field is cleared. RETURN VALUES
The putspent() function returns a non-zero value if an error was detected during its operation. Otherwise, it returns 0. USAGE
Since this function is for internal use only, compatibility is not guaranteed. For this reason, its use is discouraged. If used at all, if should be used with putpwent(3C) to update the password file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getpwnam(3C), getspnam(3C), putpwent(3C), attributes(5) SunOS 5.10 29 Dec 1996 putspent(3C)
Man Page