Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Login script

Posted by: azler Aug 12 2008, 04:41 PM

How would i go about making a log in script?
that when ever you log in checks who is logging it, and if its a certain username its says some thing to them eg:
login:test
passwd:****
****Your not bob, shame on you *****

so when you login its knows you have not logged in as bob and says a message to you.

Posted by: azler Aug 14 2008, 12:24 PM

Any one?, can some one at least tell me the file delas with login so ic an try to edit it?

Posted by: michaelk Aug 14 2008, 01:35 PM

/etc/profile file sets environment variables and runs commands for all users when they login.
Individual user startup scripts are located in $/HOME/.profile.

Depending on the desktop i.e Gnome or KDE you can also set them up to run commands when a session starts.

Assumes you are using bash and this is for some legitimate use.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)