
#include <sys/types.h>
int putpwent(const struct passwd *p, FILE *stream);
쓴다.
passwd 구조체는 다음처럼 <pwd.h>에 정의되어 있다:
struct passwd {
char *pw_name; /* 유저 이름 */
char *pw_passwd; /* 유저 패스워드 */
uid_t pw_uid; /* 유저 id */
gid_t pw_gid; /* 그룹 id */
char *pw_gecos; /* 실제 이름 */
char *pw_dir; /* 홈 디렉토리 */
char *pw_shell; /* shell 프로그램 */
};
occurs.
wuid(3), getpw(3)