Help - Search - Members - Calendar
Full Version: Login script
Linuxhelp > Support > Programming in Linux
azler
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.
azler
Any one?, can some one at least tell me the file delas with login so ic an try to edit it?
michaelk
/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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.