Man page - getpw(3)

Packages contains this manual

Available languages:

en fr es pl ja ru ro de

Manual

getpw

NOMBRE
BIBLIOTECA
SINOPSIS
DESCRIPCIÓN
VALOR DEVUELTO
ERRORES
ARCHIVOS
ATRIBUTOS
ESTÁNDARES
HISTORIAL
ERRORES
VÉASE TAMBIÉN
TRADUCCIÓN

NOMBRE

getpw - re-construye una línea del fichero de cuentas de usuario

BIBLIOTECA

Biblioteca Estándar C ( libc , -lc )

SINOPSIS

#define _GNU_SOURCE /* Vea feature_test_macros(7) */
#include <sys/types.h>
#include <pwd.h>

[[deprecated]] int getpw(uid_t uid , char * buf );

DESCRIPCIÓN

La función getpw () reconstruye la línea del fichero de cuentas de usuario para el usuario cuyo UID se da como uid y el resultado se guarda en el sitio apuntado por buf . El búfer devuelto en buf contiene una línea con el formato

nombre:contraseña:uid:gid:gecos:dir:shell

La estructura passwd se define en <pwd.h> así:

struct passwd {
char *pw_name; /* username */
char *pw_passwd; /* user password */
uid_t pw_uid; /* user ID */
gid_t pw_gid; /* group ID */
char *pw_gecos; /* user information */
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
};

For more information about the fields of this structure, see passwd (5).

VALOR DEVUELTO

The getpw () function returns 0 on success; on error, it returns -1, and errno is set to indicate the error.

If uid is not found in the password database, getpw () returns -1, sets errno to 0, and leaves buf unchanged.

ERRORES

0 o ENOENT

No user corresponding to uid .

EINVAL

buf is NULL.

ENOMEM

Memoria insuficiente para alojar la estructura passwd .

ARCHIVOS

/etc/passwd

archivo con los datos de las cuentas de usuario

ATRIBUTOS

Para obtener una explicación de los términos usados en esta sección, véase attributes (7).

Image grohtml-3958860-1.png

ESTÁNDARES

None.

HISTORIAL

SVr2.

ERRORES

La función getpw () es peligrosa ya que puede desbordar el búfer proporcionado, buf . Está obsoleta y en su lugar debería utilizar getpwuid (3).

VÉASE TAMBIÉN

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

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es> y Juan Piernas <piernas@ditec.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org .