Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

putspent(3c) [hpux man page]

putspent(3C)															      putspent(3C)

NAME
putspent - write shadow password file entry SYNOPSIS
DESCRIPTION
is the inverse of See getspent(3C). Given a pointer to an structure as created by the or functions, writes a line on the stream which matches the format of APPLICATION USAGE
In a multithreaded application, is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is executing RETURN VALUE
returns non-zero if an error was detected during its operation. Otherwise it returns zero. FILES
shadow password file. SEE ALSO
getspent(3C), shadow(4). ~ putspent(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

3 More Discussions You Might Find Interesting

1. Programming

Whant to write an entry in /etc/passwd (putpwent)

Hi i try to use the function putpwent to write a simple entry in "/etc/passwd" putpwnet returns 0 as it works but notething writes to /etc/passwd. What have i missed? My os -------- root@nighter-laptop:/home/nighter/labb# uname -a Linux nighter-laptop 2.6.22-14-generic #1 SMP Sun Oct 14... (5 Replies)
Discussion started by: nighter
5 Replies

2. Programming

/etc/shadow update password entry! ( getspent? )

Hi i just whant to update an password entry in /etc/shadow. But dosen't get it to work. Something is wrong! in this code. What i try do do is if user kalle exist in shadow. I whant it to update it's password for just that entry. #include <stdio.h> #include <errno.h> #include <stdlib.h>... (2 Replies)
Discussion started by: nighter
2 Replies

3. Cybersecurity

Mass account creation

By the company winning business from another outsource provider, I've suddenly inherited towards 300 servers and all accounts are local. One of the immediate tasks is to set up all the OS, DB, and app support staff on all of the servers operating systems. I've slapped together a crude script... (10 Replies)
Discussion started by: rbatte1
10 Replies