The user eclass contains a suite of functions that allow ebuilds
to quickly make sure users in the installed system are sane.
egetent <database> <key>
Small wrapper for getent (Linux), nidump (< Mac OS X 10.5),
dscl (Mac OS X 10.5), and pw (FreeBSD) used in enewuser()/enewgroup().
Supported databases: group passwd
enewuser <user> [uid] [shell] [homedir] [groups]
Same as enewgroup, you are not required to understand how to properly add
a user to the system. The only required parameter is the username.
Default uid is (pass -1 for this) next available, default shell is
/bin/false, default homedir is /dev/null, and there are no default groups.
enewgroup <group> [gid]
This function does not require you to understand how to properly add a
group to the system. Just give it a group name to add and enewgroup will
do the rest. You may specify the gid for the group or allow the group to
allocate the next available one.
Gets the home directory for the specified user.
Gets the shell for the specified user.
esethome <user> <homedir>
Update the home directory in a platform-agnostic way.
Required parameters is the username and the new home directory.
Specify -1 if you want to set home to the enewuser default
If the new home directory does not exist, it is created.
Any previously existing home directory is NOT moved.