libbobcat1-dev_2.02.03-x.tar.gz /etc/passwd user info
2005-2009
NAME
FBB::User - Provides the /etc/passwd info of the current user
SYNOPSIS
#include <bobcat/user>
Linking option: -lbobcat
DESCRIPTION
This class retrieves the information of the current user from the
information in /etc/passwd. The class is a simple wrapper class around the
getpwent(3) function.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace FBB.
INHERITS FROM
-
CONSTRUCTORS
User():
The default constructor determines the current user's data. The
proper completion of this constructor should be checked by calling the
User::verify() member (see below).
The copy constructor is available.
MEMBER FUNCTIONS
size_t groupid() const:
Returns the user's group-id.
std::string homedir() const:
Returns the user's home directory (including a trailing /).
std::string name() const:
Returns the user's user-name.
std::string password() const:
Returns the user's encrypted password. But see also the BUGS section.
std::string realname() const:
Returns the user's real name, as listed in the /etc/passwd's gecos field.
std::string shell() const:
Returns the user's shell.
size_t userid() const:
Returns the user's user-id.
void verify() const:
This operator throws an Errno exception if the User
constructor did not properly complete because the current user name could not
be found in /etc/passwd. It should be called before using any other
User member (not required after using the copy constructor).