Gentoo Development Guide

USER.ECLASS

Section: portage (5)
Updated: Aug 2014
Index Return to Main Contents
 

NAME

user.eclass - user management in ebuilds  

DESCRIPTION

The user eclass contains a suite of functions that allow ebuilds to quickly make sure users in the installed system are sane.  

FUNCTIONS

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.
egethome <user>
Gets the home directory for the specified user.
egetshell <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 of /dev/null. If the new home directory does not exist, it is created. Any previously existing home directory is NOT moved.
 

MAINTAINERS

base-system@gentoo.org (Linux)
Joe Jezak <josejx@gmail.com> (OS X)
usata@gentoo.org (OS X)
Aaron Walker <ka0ttic@gentoo.org> (FreeBSD)
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/user.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/user.eclass?view=log


 

Index

NAME
DESCRIPTION
FUNCTIONS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:02 GMT, August 30, 2014