Query: user
OS: debian
Section: 3bobcat
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
FBB::User(3bobcat) /etc/passwd user info FBB::User(3bobcat)NAMEFBB::User - Provides the /etc/passwd info of the current userSYNOPSIS#include <bobcat/user> Linking option: -lbobcatDESCRIPTIONThis 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.NAMESPACEFBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.INHERITS FROM-CONSTRUCTORSo User(): The default constructor determines the current user's data. This constructor throws an Errno exception if it did not properly com- plete because the current user name could not be found in /etc/passwd. The copy and move constructors are available.OVERLOADED OPERATORSThe copy and move assignment operators are available.MEMBER FUNCTIONSo size_t groupid() const: Returns the user's group-id. o std::string homedir() const: Returns the user's home directory (including a trailing /). o std::string name() const: Returns the user's user-name. o std::string password() const: Returns the user's encrypted password. But see also the BUGS section. o std::string realname() const: Returns the user's real name, as listed in the /etc/passwd's gecos field. o std::string shell() const: Returns the user's shell. o size_t userid() const: Returns the user's user-id. o void verify() const: Obsoleted, will be removed in a future Bobcat release.EXAMPLE#include <bobcat/user> #include <iostream> using namespace std; using namespace FBB; int main() { User user; user.verify(); cout << " " "name : " << user.name() << " " << "password : " << user.password() << " " << "user id : " << user.userid() << " " << "group id : " << user.groupid() << " " << "real name : " << user.realname() << " " << "home dir : " << user.homedir() << " " << "shell : " << user.shell() << " " << endl; return 0; }FILESbobcat/user - defines the class interfaceSEE ALSObobcat(7), getpwent(3)BUGSIf the user is a member of multiple groups, only the group id listed in /etc/passwd is returned by groupid(). If shadow passwording is used, the string returned by password() will probably not contain the encrypted password.DISTRIBUTION FILESo bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location;BOBCATBobcat is an acronym of `Brokken's Own Base Classes And Templates'.COPYRIGHTThis is free software, distributed under the terms of the GNU General Public License (GPL).AUTHORFrank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::User(3bobcat)
Related Man Pages |
---|
user(3bobcat) - debian |
hostname(3bobcat) - debian |
level(3bobcat) - suse |
user(3bobcat) - suse |
user(3bobcat) - centos |
Similar Topics in the Unix Linux Community |
---|
validating the userid and passwd |