Sponsored Content
Top Forums UNIX for Dummies Questions & Answers users logging on to unix boxes Post 8675 by rwb1959 on Tuesday 16th of October 2001 11:57:15 AM
Old 10-16-2001
Take a look at the man page for "last". The output contains
login name, tty, host or IP logging in from, time in and time
out. There are also many options so this is a good starting
place.
 

10 More Discussions You Might Find Interesting

1. Programming

text boxes, radio buttons , check boxes in c++ on unix

Hi ! Please tell me how to get radio buttons, text boxes , check boxes , option buttons , pull down menus in C++ on Unix. I think it would be done using curses.h ..but that's all i know. TIA, Devyani. (3 Replies)
Discussion started by: devy8
3 Replies

2. UNIX for Dummies Questions & Answers

logging users activity

Hello All! Does anyone know of a nice way to log commands in solaris 8. What I need is a program or script that saves any command that a user does in solaris command prompt. So when Steven logs in on a system, it should record everything he does, from an ls to exit with timestamps. I've been... (6 Replies)
Discussion started by: dozy
6 Replies

3. AIX

Logging off users

What is the best way to logoff users from my Unix system? I have done a search and found that you can do a w or who - find who is on, and ps-ef | grep <user> and kill their processes. But what if you have a bunch of users and you need them off the system quickly? Killing individual processes... (1 Reply)
Discussion started by: outtacontrol
1 Replies

4. Solaris

restricting users privileges and logging their activities

Hello, I'm administrating new installed cluster that runs Legato Networker and Oracle 9. And I want to restrict the use of root to my self and givr the application and DBA the proper and needed privileges to do their duties without hassle in addition I would like to log users activities. my... (0 Replies)
Discussion started by: sh_ksa
0 Replies

5. Solaris

logging logout of users

I am looking for solutions to address my need to log to a file whenever a user logs out or session disconnects. (1 Reply)
Discussion started by: mhm4
1 Replies

6. UNIX for Advanced & Expert Users

ssh not logging users

We installed ssh on our AIX 5.3 box. The issue we are facing is that we dont get the users listed when we use 'w' or 'who'. After going through google without success, checked the www.openssh.org site. The FAQ section posted the solution that - How do I go about this? Has anyone faced an issue... (2 Replies)
Discussion started by: ranj@chn
2 Replies

7. Solaris

Prevent users logging in as root

I would like to know how to prevent users connecting to a server using SSH as root. I would still like them to be able to login with their username and then change to su. But I would like to prevent them logging in directly as root. I have searched the forum and read that I should set... (3 Replies)
Discussion started by: Sepia
3 Replies

8. Shell Programming and Scripting

Logging out users

Hi, How do force users to log off Unix through shell? (2 Replies)
Discussion started by: Wahmed9
2 Replies

9. Solaris

Logging out idle users after a certain timeframe

We recently underwent a security audit and have a new requirement to not allow users to stay logged on overnight. In order to place this policy into effect i need a way to check for idle users and log them off. Is there any good way to enforce this policy in Solaris 10 and make it work in such a... (11 Replies)
Discussion started by: goose25
11 Replies

10. Shell Programming and Scripting

How to show a list of currently logged in and logging out users?

Hi Guys! I am sure that this question might appeared previously, but I still don't know how to show a list of logged out users. Please help with this! Thanks in advance:) (5 Replies)
Discussion started by: saloliubliu
5 Replies
LOGIN_OK(3)						   BSD Library Functions Manual 					       LOGIN_OK(3)

NAME
auth_ttyok, auth_hostok, auth_timeok -- functions for checking login class based login restrictions LIBRARY
System Utilities Library (libutil, -lutil) SYNOPSIS
#include <sys/types.h> #include <time.h> #include <login_cap.h> int auth_ttyok(login_cap_t *lc, const char *tty); int auth_hostok(login_cap_t *lc, const char *host, char const *ip); int auth_timeok(login_cap_t *lc, time_t t); DESCRIPTION
This set of functions checks to see if login is allowed based on login class capability entries in the login database, login.conf(5). The auth_ttyok() function checks to see if the named tty is available to users of a specific class, and is either in the ttys.allow access list, and not in the ttys.deny access list. An empty ttys.allow list (or if no such capability exists for the given login class) logins via any tty device are allowed unless the ttys.deny list exists and is non-empty, and the device or its tty group (see ttys(5)) is not in the list. Access to ttys may be allowed or restricted specifically by tty device name, a device name which includes a wildcard (e.g. ttyD* or cuaD*), or may name a ttygroup, when group=<name> tags have been assigned in /etc/ttys. Matching of ttys and ttygroups is case sensitive. Passing a NULL or empty string as the tty parameter causes the function to return a non-zero value. The auth_hostok() function checks for any host restrictions for remote logins. The function checks on both a host name and IP address (given in its text form, typically n.n.n.n) against the host.allow and host.deny login class capabilities. As with ttys and their groups, wildcards and character classes may be used in the host allow and deny capability records. The fnmatch(3) function is used for matching, and the matching on hostnames is case insensitive. Note that this function expects that the hostname is fully expanded (i.e., the local domain name added if necessary) and the IP address is in its canonical form. No hostname or address lookups are attempted. It is possible to call this function with either the hostname or the IP address missing (i.e. NULL) and matching will be performed only on the basis of the parameter given. Passing NULL or empty strings in both parameters will result in a non-zero return value. The auth_timeok() function checks to see that a given time value is within the times.allow login class capability and not within the times.deny access lists. An empty or non-existent times.allow list allows access at any time, except if a given time is falls within a period in the times.deny list. The format of time period records contained in both times.allow and times.deny capability fields is explained in detail in the login_times(3) manual page. RETURN VALUES
A non-zero return value from any of these functions indicates that login access is granted. A zero return value means either that the item being tested is not in the allow access list, or is within the deny access list. SEE ALSO
getcap(3), login_cap(3), login_class(3), login_times(3), login.conf(5), termcap(5) BSD
January 2, 1997 BSD
All times are GMT -4. The time now is 03:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy