Sponsored Content
Full Discussion: Record login session...
Top Forums Shell Programming and Scripting Record login session... Post 302364481 by anupdas on Friday 23rd of October 2009 07:54:38 AM
Old 10-23-2009
Record login session...

How to record my login session in a file named session.lst?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

automatic login from windows by a telnet session

Help me please, I wanna know if it's possible to define in windows the option when somebody starts a telnetsession to a unix machine it automatically logs in with the username and password of this user. Or if there is a possibility to set the username and password to an Icon on the users... (3 Replies)
Discussion started by: Herwin
3 Replies

2. UNIX for Advanced & Expert Users

User login session

Having a problem on AIX 4.3.3 with the following error when more than 2 users try and sign onto the server. 3004-312 All available login sessions are in use. ???? (1 Reply)
Discussion started by: Docboyeee
1 Replies

3. UNIX for Advanced & Expert Users

Unix login session and Password

Hi All, I've login to Unix using login name guest and I'm working on it, I need another session to run some script hence tried to login but password invalid it says here my question is : Since I'm in working in one session can I set the password without knowing old password? is there any... (1 Reply)
Discussion started by: krishna
1 Replies

4. UNIX for Dummies Questions & Answers

Need a Help Please- Login a reflectionX session but what you type is not what you get

Im having a problem using unix program client ReflectionX. as soon as i login to one session i type to change to any directory or type something but the problem is that what i type in is not what you get. ie i type: $cd ~/alejo (to change HOME DIRECTORY - alejo subdirectory but when i type it... (2 Replies)
Discussion started by: alexcol
2 Replies

5. Shell Programming and Scripting

Perl website login and session

Hi, I'm currently working on a perl website, and I would need a system where a few users can login into the administration side of the site. about 5-10 users maximum, all pretty simple. I was thinking of using an .htaccess file and a seperate admin folder on the server. I'm wondering if there... (2 Replies)
Discussion started by: LNC
2 Replies

6. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

7. Shell Programming and Scripting

Determining if session is a login session

Besides 'who am i' and 'tty' what commands could be used to determine if a session is interactive as compared to a web process or cron process. Any command should work with the common unix variants. (3 Replies)
Discussion started by: jgt
3 Replies

8. UNIX for Dummies Questions & Answers

Record standard output and inputs made on a session

When using Oracle, we have an option to turn spool on, which records that transactions and output to a file. Any such options on UNIX, where I can get everything I have on my screen into a file? That would be helpful in documenting the OS level changes that I perform manually. regards Roshni (1 Reply)
Discussion started by: RoshniMehta
1 Replies

9. Shell Programming and Scripting

Need to track what Commands run in a login session

Hi I need to track what commands run in login session in solaris whether it is root or any normal users in bash shell. My actual requirement is that when a user (nomal/root) login into the system, whatever commands he run, it should log into file on specified path . I don't require command... (4 Replies)
Discussion started by: hb00
4 Replies

10. UNIX for Advanced & Expert Users

Login and logout time of a session

Hi, How can I find out the login and logout time of the old UNIX session/user?. (2 Replies)
Discussion started by: sharif
2 Replies
GETLOGIN(2)						      BSD System Calls Manual						       GETLOGIN(2)

NAME
getlogin, setlogin -- get/set login name SYNOPSIS
#include <unistd.h> char * getlogin(void); int setlogin(const char *name); DESCRIPTION
The getlogin() routine returns the login name of the user associated with the current session, as previously set by setlogin(). The name is normally associated with a login shell at the time a session is created, and is inherited by all processes descended from the login shell. (This is true even if some of those processes assume another user ID, for example when su(1) is used.) setlogin() sets the login name of the user associated with the current session to name. This call is restricted to the super-user, and is normally used only when a new session is being created on behalf of the named user (for example, at login time, or when a remote shell is invoked). RETURN VALUES
If a call to getlogin() succeeds, it returns a pointer to a null-terminated string in a static buffer. If the name has not been set, it returns NULL. If a call to setlogin() succeeds, a value of 0 is returned. If setlogin() fails, a value of -1 is returned and an error code is placed in the global location errno. ERRORS
The following errors may be returned by these calls: [EFAULT] The name parameter gave an invalid address. [EINVAL] The name parameter pointed to a string that was too long. Login names are limited to MAXLOGNAME (from <sys/param.h>) characters, currently 12. [EPERM] The caller tried to set the login name and was not the super-user. SEE ALSO
setsid(2) BUGS
Login names are limited in length by setlogin(). However, lower limits are placed on login names elsewhere in the system (UT_NAMESIZE in <utmp.h>). In earlier versions of the system, getlogin() failed unless the process was associated with a login terminal. The current implementation (using setlogin()) allows getlogin to succeed even when the process has no controlling terminal. In earlier versions of the system, the value returned by getlogin() could not be trusted without checking the user ID. Portable programs should probably still make this check. HISTORY
The getlogin() function first appeared in 4.4BSD. 4.2 Berkeley Distribution June 9, 1993 4.2 Berkeley Distribution
All times are GMT -4. The time now is 06:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy