putspent man page on SmartOS

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

PUTSPENT(3C)							  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 getsp‐
       nam(3C). Given a pointer to a spwd structure created by	getspent()  or
       getspnam(),  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;
	 int		sp_lstchg;
	 int		sp_min;
	 int		sp_max;
	 int		sp_warn;
	 int		sp_inact;
	 int		sp_expire;
	 unsigned int	sp_flag;

       If the sp_min, sp_max, sp_lstchg, sp_warn, sp_inact, or sp_expire  mem‐
       ber of the  spwd structure is −1, or if sp_flag is 0, the corresponding
       /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)

				 Jan 23, 2008			  PUTSPENT(3C)
[top]

List of man pages available for SmartOS

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