GETPW

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Å´º¾ó (3)
Updated: 1996³â 5¿ù 27ÀÏ
Index
Return to Main Contents
 

À̸§

getpw - Æнº¿öµå ¶óÀÎ ¿£Æ®¸®¸¦ ´Ù½Ã »ý¼ºÇÑ´Ù.  

»ç¿ë¹ý

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

int getpw(uid_t uid, char *buf);
 

¼³¸í

getpw() ÇÔ¼ö´Â ¹öÆÛ buf¿¡ ÁÖ¾îÁø »ç¿ëÀÚ uid¸¦ À§ÇÑ Æнº¿öµå ¶óÀÎ ¿£Æ®¸®¸¦ ´Ù½Ã »ý¼ºÇÑ´Ù. ¹ÝȯµÈ ¹öÆÛ´Â ´ÙÀ½°ú °°Àº Çü½ÄÀÇ ¶óÀÎÀ» Æ÷ÇÔÇÑ´Ù.

name:passwd:uid:gid:gecos:dir:shell

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 ÇÁ·Î±×·¥ */
};

 

¹Ýȯ°ª

getpw() ÇÔ¼ö´Â ¼º°ø½Ã 0À» ¹ÝȯÇϰųª ¿¡·¯¶ó¸é -1 À» ¹ÝȯÇÑ´Ù.  

¿¡·¯

ENOMEM
Æнº¿öµå ±¸Á¶Ã¼¸¦ ÇÒ´çÇϱâ À§ÇÑ ¸Þ¸ð¸®°¡ ÃæºÐÇÏÁö ¾Ê´Ù.
 

ÆÄÀÏ

/etc/passwd
Æнº¿öµå µ¥ÀÌÅͺ£À̽º ÆÄÀÏ
 

ȣȯ

SYSVr2.  

¹ö±×

getpw() ÇÔ¼ö´Â Á¦°øµÇ´Â ¹öÆÛ buf ¸¦ ¿À¹öÇ÷οì ÇÒÁö ¸ð¸£±â ¶§¹®¿¡ À§ÇèÇÏ´Ù. ÀÌ ÇÔ¼ö´Â getpwuid()¿¡ ÀÇÇØ ±¸½ÄÀÌ µÇ¾ú´Ù.  

°ü·Ã Ç׸ñ

fgetpwent(3), getpwent(3), setpwent(3), endpwent(3), getpwnam(3), getpwuid(3), putpwent(3), passwd(5)  

¿ªÀÚ

Á¤°­ÈÆ <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