Module posix.pwd
Password Database Operations.
Query the system password database.
Functions
| endpwent () | Release password database resources. |
| getpwent () | Fetch next password entry. |
| getpwnam (name) | Fetch named user. |
| getpwuid (uid) | Fetch password entry with given user id. |
| setpwent () | Rewind next getpwent back to start of database. |
Tables
| PosixPasswd | Password record. |
Functions
- endpwent ()
-
Release password database resources.
See also:
- getpwent ()
-
Fetch next password entry.
Returns:
-
PosixPasswd
next password record
See also:
Usage:
t = P.getpwent () while t ~= nil do process (t) t = P.getpwent () end P.endpwent ()
- getpwnam (name)
-
Fetch named user.
Parameters:
- name string user name
Returns:
-
PosixPasswd
passwd record for name
Usage:
t = P.getpwnam "root" - getpwuid (uid)
-
Fetch password entry with given user id.
Parameters:
- uid int user id
Returns:
-
PosixPasswd
passwd record for uid
Usage:
t = P.getpwuid (0) - setpwent ()
-
Rewind next getpwent back to start of database.
See also: