other versions
- wheezy 3.01.00-1+b1
- jessie 3.23.01-1
- testing 4.04.00-1
- unstable 4.04.00-1
- experimental 4.07.00-1
other sections
FBB::User(3bobcat) | /etc/passwd user info | FBB::User(3bobcat) |
NAME¶
FBB::User - Provides the /etc/passwd info of the current userSYNOPSIS¶
#include <bobcat/user>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¶
FBBINHERITS FROM¶
-CONSTRUCTORS¶
- o
- User():
OVERLOADED OPERATORS¶
The copy and move assignment operators are available.MEMBER FUNCTIONS¶
- o
- size_t groupid() const:
- o
- std::string homedir() const:
- o
- std::string name() const:
- o
- std::string password() const:
- o
- std::string realname() const:
- o
- std::string shell() const:
- o
- size_t userid() const:
- o
- void verify() const:
EXAMPLE¶
#include <bobcat/user> #include <iostream> using namespace std; using namespace FBB; int main() { User user; user.verify(); cout << "\n" "name : " << user.name() << "\n" << "password : " << user.password() << "\n" << "user id : " << user.userid() << "\n" << "group id : " << user.groupid() << "\n" << "real name : " << user.realname() << "\n" << "home dir : " << user.homedir() << "\n" << "shell : " << user.shell() << "\n" << endl; return 0; }
FILES¶
bobcat/user - defines the class interfaceSEE ALSO¶
bobcat(7), getpwent(3)BUGS¶
If 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 FILES¶
- o
- 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;
BOBCAT¶
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.COPYRIGHT¶
This is free software, distributed under the terms of the GNU General Public License (GPL).AUTHOR¶
Frank B. Brokken ( f.b.brokken@rug.nl).2005-2012 | libbobcat1-dev_3.01.00-x.tar.gz |