Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi friends
here is my question
In login screen,after entering the username we need to enter password,if password is correct we can log into GUI, if password is wrong,again we need to enter user name and password,But what i want to do is if entered password is wrong at first-attempt,then immediately system goes to shutdown...how can i do this.. anybody have idea
Sounds like you're creating a Denial of Service vulnerability on yourself... there are controls in place to lock an account after any number of failed attempts - rather than shutting down the whole system and making it unavailable to all accounts/users/clients.
If this is of interest to you, check out /etc/pam.d/system-auth. look for 'deny' and 'unlock_time' parameters to set how many failed login it takes to lock the account and for how long to lock it...
For the most basic functionality, you could simply edit /etc/pam.d/common-auth and change it to the following:
auth sufficient pam_unix.so nullok_secure
auth required pam_exec.so shutdown -h now
This will cause the system to shutdown after ANY failed password attempt that uses PAM. For more control, you could instead have pam_exec run a custom script that, say for example, uses a counter method (so it only shuts down after 5 failed logins), or you could edit each application's PAM configuration separately. Add the pam_exec line to /etc/pam.d/gnome-screensaver, for instance, to only have it affect the locked screen.
Please reply with an update if this works for you.
thanks Beotch
unfortunately i was unable to locate /etc/pam.d/common-auth btw i am using solaris express developer edition 1/08 do you have any idea about that file..where can i find in my system
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.