Sponsored Content
Full Discussion: Last user login date
Top Forums UNIX for Dummies Questions & Answers Last user login date Post 302113077 by sysgate on Tuesday 3rd of April 2007 08:38:24 AM
Old 04-03-2007
Code:
last -n 20

- to get the latest 20 logins.

Quote:
Examples
1 To display all the recorded logins and logoffs by user root or from the console terminal, type:

last root console
2 To display the time between reboots of the system, type:

last reboot
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I create user but i cant login the user i created.

I created a user, i login as a root. I add him in the group where he can access and login as a root! I checked it in users' list and in group's list, he is there. My problem is this, I cant login using the username/account I just created! What should i do to use and login the user/account i've just... (5 Replies)
Discussion started by: jerome
5 Replies

2. UNIX for Dummies Questions & Answers

Collecting & Displaying of Last User ID and Date of Last Login

Hi, I needed to write a script to "Collect and Display the Last User ID and Date of Last Login". The requirement is: When a workstation stops reporting it could be for many reasons. If we know the last person who logged in before the workstation came down, then we can contact the last... (1 Reply)
Discussion started by: amittal
1 Replies

3. Shell Programming and Scripting

Collecting & Displaying of Last User ID and Date of Last Login

Hi, I needed to write a script to "Collect and Display the Last User ID and Date of Last Login". The requirement is: When a workstation stops reporting it could be for many reasons. If we know the last person who logged in before the workstation came down, then we can contact the last... (1 Reply)
Discussion started by: amittal
1 Replies

4. Shell Programming and Scripting

Running script from other user rather than login user

Hi, My requirement is that i am login from ROOT in a script but when any command is coming which is logging to sqlplus then i have to run it with normal user as only normal user have permission to connect to sqlplus . i tried making a script like this : #! /bin/ksh su -... (3 Replies)
Discussion started by: rawatds
3 Replies

5. Solaris

error message rmclomv ... SC Login Failure for user Please login:

Hello World ~ HW : SUN Fire V240 OS : Solaris 8 Error message prompts 'rmclomv ... SC login failure ...' on terminal. and Error Message prompts continually 'SC Login Failure for user Please login:' on Single Mode(init S) The System is in normal operation, though In case of rain, Can... (1 Reply)
Discussion started by: lifegeek
1 Replies

6. Shell Programming and Scripting

How to increment a user defined date value in the DATE format itself using shell script?

I need to increment a date value through shell script. Input value consist of start date and end date in DATE format of unix. For eg. I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr. The output must look like 1/1/09 2/2/09 . . . 31/1/09 . . 1/2/09 . 28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies

7. Shell Programming and Scripting

How to Login as another user through Shell script from current user[Not Root]

Hi Every body, I would need a shell script program to login as different user and perform some copy commands in the script. example: Supppose ora_toms is the active user ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands ... (9 Replies)
Discussion started by: ujjwal27
9 Replies

8. AIX

User Account Login Login on your AIX server

I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs. I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Discussion started by: perl_in_my_shel
1 Replies

9. Shell Programming and Scripting

Login into another user from user inside script

now i have logged in username : ramesh in unix Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user. Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies

10. UNIX for Advanced & Expert Users

Prevent user from creating new user from his login

Hi Experts, Need your support Redhat 6.5 I want to create a user with all(read, write, execute) privileges except that user should not be able to create any new user from his login to perform any task. (10 Replies)
Discussion started by: as7951
10 Replies
LOGIN(1)						    BSD General Commands Manual 						  LOGIN(1)

NAME
login -- authenticate users and set up their session environment SYNOPSIS
login [-Ffps] [-a address] [-h hostname] [user] DESCRIPTION
The login utility logs users (and pseudo-users) into the computer system. If no user is specified, or if a user is specified and authentication of the user fails, login prompts for a user name. Authentication of users is done via passwords. If the user can be authenticated via S/Key, then the S/Key challenge is incorporated in the password prompt. The user then has the option of entering their Kerberos or normal password or the S/Key response. Neither will be echoed. The options are as follows: -a The -a option specifies the address of the host from which the connection was received. It is used by various daemons such as telnetd(8). This option may only be used by the super-user. -F The -F option acts like the -f option, but also indicates to login that it should attempt to rewrite an existing Kerberos 5 creden- tials cache (specified by the KRB5CCNAME environment variable) after dropping permissions to the user logging in. This flag is not supported under pam(8). -f The -f option is used when a user name is specified to indicate that proper authentication has already been done and that no password need be requested. This option may only be used by the super-user or when an already logged in user is logging in as themselves. -h The -h option specifies the host from which the connection was received. It is used by various daemons such as telnetd(8). This option may only be used by the super-user. -p By default, login discards any previous environment. The -p option disables this behavior. -s Require a secure authentication mechanism like Kerberos or S/Key to be used. This flag is not supported under pam(8). If a user other than the superuser attempts to login while the file /etc/nologin exists, login displays its contents to the user and exits. This is used by shutdown(8) to prevent normal users from logging in when the system is about to go down. Immediately after logging a user in, login displays the system copyright notice, the date and time the user last logged in, the message of the day as well as other information. If the file ``.hushlogin'' exists in the user's home directory, all of these messages are suppressed. This is to simplify logins for non-human users. login then records an entry in the wtmp(5) and utmp(5) files, executes site-specific login commands via the ttyaction(3) facility with an action of "login", and executes the user's command interpreter. login enters information into the environment (see environ(7)) specifying the user's home directory (HOME), command interpreter (SHELL), search path (PATH), terminal type (TERM) and user name (both LOGNAME and USER). The user's login experience can be customized using login class capabilities as configured in /etc/login.conf and documented in login.conf(5). The standard shells, csh(1) and sh(1), do not fork before executing the login utility. FILES
/etc/login.conf login class capability database /etc/motd message-of-the-day /etc/nologin disallows non-superuser logins /var/run/utmp list of current logins /var/log/lastlog last login account records /var/log/wtmp login account records /var/mail/user system mailboxes .hushlogin makes login quieter SEE ALSO
chpass(1), newgrp(1), passwd(1), rlogin(1), skey(1), getpass(3), ttyaction(3), login.conf(5), passwd.conf(5), utmp(5), environ(7), kerberos(8), pam(8) HISTORY
A login appeared in Version 6 AT&T UNIX. TRADEMARKS AND PATENTS
S/Key is a trademark of Bellcore. BSD
November 19, 2008 BSD
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy