*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> login (3)              
Title
Content
Arch
Section
 

LOGIN(3)

Contents


NAME    [Toc]    [Back]

     login, logout, logwtmp - login utility functions

LIBRARY    [Toc]    [Back]

     System Utilities Library (libutil, -lutil)

SYNOPSIS    [Toc]    [Back]

     #include <util.h>

     void
     login(struct utmp *ut);

     int
     logout(const char *line);

     void
     logwtmp(const char *line, const char *name, const char *host);

DESCRIPTION    [Toc]    [Back]

     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.

RETURN VALUES    [Toc]    [Back]

     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.

FILES    [Toc]    [Back]

     /dev/*
     /etc/ttys
     /var/run/utmp
     /var/log/wtmp

SEE ALSO    [Toc]    [Back]

      
      
     utmp(5)

BSD                            December 14, 1995                           BSD
[ Back ]
 Similar pages
Name OS Title
auth_hostok FreeBSD functions for checking login class based login restrictions
auth_timeok FreeBSD functions for checking login class based login restrictions
auth_ttyok FreeBSD functions for checking login class based login restrictions
login_ok FreeBSD functions for checking login class based login restrictions
setclassenvironment FreeBSD functions for using the login class capabilities database
setclassresources FreeBSD functions for using the login class capabilities database
setclasscontext FreeBSD functions for using the login class capabilities database
setusercontext FreeBSD functions for using the login class capabilities database
login_class FreeBSD functions for using the login class capabilities database
login_getstyle FreeBSD functions for accessing the login class capabilities database
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service