PUTPWENT

Section: 리눅스 프로그래머 매뉴얼 (3)
Updated: 1993년 5월 9일
Index
Return to Main Contents
 

이름

putpwent - 패스워드 파일 엔트리를 쓴다.  

사용법

#include <pwd.h>
#include <stdio.h>
#include <sys/types.h>

int putpwent(const struct passwd *p, FILE *stream);
 

설명

putpwent() 함수는 stream과 관련된 파일에 구조체 p 인 패스워드 엔트리를 쓴다.

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 프로그램 */
};

 

반환값

putpwent() 함수는 성공시 0을 리턴하고, 에러가 발생하면 -1을 반환한다. occurs.  

에러

EINVAL
유효하지 않은 인자가 주어졌다.
 

호환

SVID 3  

관련 항목

fgetpwent(3), getpwent(3), setpwent(3), endpwent(3), getpwnam(3), getpwuid(3), getpw(3)  

역자

정강훈 <skyeyes@soback.kornet.net>, 2001년 4월 30일


 

Index

이름
사용법
설명
반환값
에러
호환
관련 항목
역자

This document was created by man2html, using the manual pages.
Time: 08:07:01 GMT, March 25, 2004