.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" .\" Modified Sat Jul 24 19:37:37 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon May 27 22:40:48 1996 by Martin Schulze (joey@linux.de) .\" Translated into Spanish Tue Jan 13 1998 by Gerardo Aburruzaga .\" García .\" .TH FGETPWENT 3 "17 mayo 1996" "GNU" "Manual del Programador de Linux" .SH NOMBRE fgetpwent \- obtiene una entrada de un fichero de contraseñas .SH SINOPSIS .nf .B #include .B #include .B #include .sp .BI "struct passwd *fgetpwent(FILE *" flujo ); .fi .SH DESCRIPCIÓN La función \fBfgetpwent()\fP devuelve un puntero a una estructura que contiene los campos descompuestos de una línea del fichero correspondiente a \fIflujo\fP. La primera vez que se la llama devuelve la primera entrada; a partir de ahí, devuelve las entradas sucesivas. El fichero que corresponde a \fIflujo\fP debe tener el mismo formato que \fI/etc/passwd\fP. .PP La estructura \fIpasswd\fP está definida en \fI\fP como sigue: .sp .RS .nf .ta 8n 16n 32n struct passwd { char *pw_name; /* nombre de usuario */ char *pw_passwd; /* contraseña del usuario */ uid_t pw_uid; /* identificación del usuario */ gid_t pw_gid; /* identificación del grupo */ char *pw_gecos; /* nombre real */ char *pw_dir; /* directorio inicial */ char *pw_shell; /* programa `shell' */ }; .ta .fi .RE .SH "VALOR DEVUELTO" La función \fBfgetpwent()\fP devuelve la dirección de una estructura passwd, o NULL si no hay más entradas o si ha ocurrido un error. .SH ERRORES .TP .B ENOMEM Memoria insuficiente para alojar la estructura passwd. .SH FICHEROS .TP .I /etc/passwd fichero con los datos de los usuarios .SH "CONFORME A" SVID 3 .SH "VÉASE TAMBIÉN" .BR getpwnam "(3), " getpwuid "(3), " getpwent "(3), " setpwent (3), .BR endpwent "(3), " getpw "(3), " putpwent (3), .BR passwd (5).