Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
putpwent - enter user into user catalog (extension)
&pagelevel(4)&pagelevel
Syntax | #include <pwd.h> int putpwent(const struct passwd *p, FILE *f); |
Description | putpwent() writes the user data from the password structure p into the user catalog serially. The calling process must have appropriate privileges.
p is a password structure that was obtained with getpwent() , getpwuid() or getpwnam() and then modified. f is supported only for compatibility reasons; it is not evaluated. |
Return val. | 0 | if successful. |
| != 0
| if an error occurs. errno is set to indicate the error. |
Errors | putpwent() will fail if:
|
| EINVAL
| The user data is invalid. |
| EFAULT
| The specified address of the passwd structure is invalid. |
| ENOENT
| The user is not recognized. |
| EPERM
| The calling process does not have appropriate privileges. |
Notes | There is no /etc/passwd password file in the POSIX subsystem. User data is stored internally in the user catalog (see also the manual "POSIX Basics" [1 (Related publications)]). |
See also | getpwent() and the manual "POSIX Basics" [1 (Related publications)].
|