Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script

Status
Not open for further replies.

LeDam

IS-IT--Management
Oct 10, 2001
210
BE
How can i run a script on all user login ?? But no by usiong .profile and .dtprofile because these files ares run at all terminal start!
 
Sorry, I don't quite understand the question. However, scripts included in /etc/profile will be executed when anyone logs in. HTH.
 
It doesn't work.......
/etc/profile isn't launch a any login ...
 
According to the comments within /etc/profile itself:

"# System wide profile. All variables set here may be overridden by a user's personal .profile file in their $HOME directory. However, all commands here will be executed at login regardless.

This seems to me to mean that commands included therein will be acted upon in any case.Perhaps I'm misunderstanding what you need?
 
Yes i know..... it's very strange......
Is it good this command lines :

finger $LOGIN >> /root/User
 
I try
echo "----------" >> /root/User
It doesn't work.....
 
Ah-ha. Try using finger $LOGNAME >> /root/user in your /etc/profile instead. I have tried this on one of our systems and it seems t odo the job. HTH.
 
It doesn't work. In fact i'm trying to have the username and the IP adress of all user that log into my system....can you help me???
 
En fait, lors d'un login, il passe par le fichier /etc/profile si il n'est pas en mode graphique. Dans le cas contraire il ne passe pas dedans. Ne connaissez vous pas un fichier a travers lequel il passe tous les deux??
 
Babelfish translation:

'In fact, at the time of a login, it passes by the file / etc/profile if it is not in graphic mode. In the contrary case it does not pass inside. Do not know not a file has itself through which it passes both??'

Sorry, I don't know of any file other than /etc/profile which might work in the way you envisage. Perhaps others do? In the meantime, I'll keep thinking of possibilities.

 
By editing the /etc/dtprofile or something you can include your /etc/profile to have commands run on every login.

May be you want to check the [tt]auth2[/tt] variable (Authentication method 2) for all users. You can run any program at user logon.

I hope it works...
Unix was made by and for smart people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top