The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
shadow.h File Reference

the password hashes (/etc/shadow: name:hash:last:min:max:warn: inactive:expire:), which only root can read. More...

Go to the source code of this file.

Data Structures

struct  spwd

Macros

#define SHADOW_FILE   "/etc/shadow"

Functions

struct spwd * getspnam (const char *name)
 the entry of a user, in a static buffer.

Detailed Description

the password hashes (/etc/shadow: name:hash:last:min:max:warn: inactive:expire:), which only root can read.

ginnOS uses the name and the hash; the other fields are kept as they are. a hash of "*" or "!" (or one that starts with "!") is a locked account; an empty one needs no password.

Macro Definition Documentation

◆ SHADOW_FILE

#define SHADOW_FILE   "/etc/shadow"

Function Documentation

◆ getspnam()

struct spwd * getspnam ( const char * name)

the entry of a user, in a static buffer.

Returns
NULL if there is none, or the file cannot be read (not root).