This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



LOGIN(3)                                BSD Library Functions Manual                                LOGIN(3)

NAME
     login, logout, logwtmp -- login utility functions (DEPRECATED)

SYNOPSIS
     #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
     The login(), logout(), and logwtmp() functions are DEPRECATED; use pututxline(3) instead.

     These functions operate on the database of current users in /var/run/utmpx and the system log file.
     Superuser permission is required.

     The login() function updates the /var/run/utmpx files with user information contained in ut (after con-verting converting
     verting to a struct utmpx, as described in pututxline(3)).

     The logout() function removes the entry from /var/run/utmpx corresponding to the device line.

     The logwtmp() function adds an entry to the system log file.  Since login() will add the appropriate
     entry during a login, logwtmp() is usually used for logouts.

RETURN VALUES
     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/utmpx.  However, there is no error indication due to lack of permissions.

FILES
     /dev/*
     /var/run/utmpx

SEE ALSO
     pututxline(3), utmp(5), utmpx(5)

BSD                                           December 14, 1995                                          BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...