LOGIN(3) BSD Programmer's Manual LOGIN(3)
login, logout, logwtmp - login utility functions
#include <utmp.h> #include <util.h> void login(struct utmp *ut); int logout(const char *line); void logwtmp(const char *line, const char *name, const char *host);
The login(), logout(), and logwtmp() functions operate on the database of current users in /var/run/utmp and on the logfile /var/log/wtmp of logins and logouts. The login() function updates the /var/run/utmp and /var/log/wtmp files with user information contained in ut. The logout() function removes the entry from /var/run/utmp corresponding to the device line. The logwtmp() function adds an entry to /var/log/wtmp. Since login() will add the appropriate entry for /var/log/wtmp during a login, logwtmp() is usually used for logouts.
logout() returns non-zero if it was able to find and delete an entry for line, and zero if there is no entry for line in /var/run/utmp.
/dev/* /etc/ttys /var/run/utmp /var/log/wtmp
utmp(5) MirOS BSD #10-current December 14, 1995 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.