Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I get the last login time of a particular user? Post 302369310 by DukeNuke2 on Saturday 7th of November 2009 11:25:46 AM
Old 11-07-2009
your question has the answer... have a look at the output of the command "last".

i asume that this is homework, also. so i close this thread...
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Automatic time out of user login

I have asked by our security team to implement an automatic time out for user logins after a specified time interval. I have never heard of this feature in Unix before. Does anyone know of a way to accomplish this for HP-UX 11i? (2 Replies)
Discussion started by: keelba
2 Replies

2. UNIX for Dummies Questions & Answers

get all user's login time

hi all, i need yor help!!!:D i am a newbie in programming i want to get user list and their login time... i have search and learn about pswd and utmp, but i only can get usr list without their login time... do you have an idea to solve my problem? thanx (5 Replies)
Discussion started by: alif
5 Replies

3. 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

4. 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

5. Solaris

How to Restrict user login after certain time in Solaris??

My OS is Solaris 10, I would like to know if there is any way to restrict user login to the system (either remote or console login) after certain time, say 20:00 on Mon to Fri and whole day on SAT and SUN??? Sorry that I am a new user on Unix System. Any comment is fully appreciated!!! Alex (7 Replies)
Discussion started by: alessandro31
7 Replies

6. AIX

User login time

I want to set the "logintimes" variable for a user on a server who need access mornings and night how to I set the "logintimes" I want the user to log in from 08:00 to 12:00 and 17:00 to 21:00 is this possible? (1 Reply)
Discussion started by: daveisme
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
CHSH(1) 							   User Commands							   CHSH(1)

NAME
chsh - change login shell SYNOPSIS
chsh [options] [LOGIN] DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change the login shell for her own account; the superuser may change the login shell for any account. OPTIONS
The options which apply to the chsh command are: -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -s, --shell SHELL The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell. If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks. NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser, and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell back to its original value. FILES
/etc/passwd User account information. /etc/shells List of valid login shells. /etc/login.defs Shadow password suite configuration. SEE ALSO
chfn(1), login.defs(5), passwd(5). shadow-utils 4.5 01/25/2018 CHSH(1)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy