Next: , Previous: , Up: system passwd   [Contents][Index]


19.1.3 Searching entries from passwd

We are meant to call these function after a call to mbfl_system_passwd_read(). The following functions inspect entries from /etc/passwd and locate them using numeric indexes; such indexes are valid only until the next call to mbfl_system_passwd_reset().

Function: mbfl_system_passwd_find_entry_by_name name
Function: mbfl_system_passwd_find_entry_by_name_var _RV name

Search the entries of passwd for one whose user name is name. When successful: print to stdout the index of the entry and return true; otherwise return false. We can use the index with the functions described in Inspecting entries from passwd.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.

Function: mbfl_system_passwd_find_entry_by_uid uid
Function: mbfl_system_passwd_find_entry_by_uid_var _RV uid

Search the entries of passwd for one whose user id is uid. When successful: print to stdout the index of the entry and return true; otherwise return false. We can use the index with the functions described in Inspecting entries from passwd.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.


Next: , Previous: , Up: system passwd   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.