Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
My company has policy that user accounts expire once a month and they also get locked out if they re-try login more than 3 times (pam_tally). It gets very annoying every time they come and ask to get password changed.
How do I let users change their own password? Also let the system email them every day for two weeks before password expiration and until they change their password?
Are your users prohibited to change their own passwords? Have you had it tried at user level? Normally a password is user defined and users can change them using the passwd utility.
If you're looking for a way to automate notification about expiration of passwords, then look here for some ideas. Easily adapted to your needs. Of course you need to be able to send out emails from that server which I assume you are.
passwd has setuid bit set by default. Users can change their own passwords just by running 'passwd'. Unless you have additional restrictions on there (maybe the sysadmin has removed the setuid bit?).
Users can try SSH 3 times - after which they get locked out of the system via pam_tally so they cannot log back in again to execute the passwd(1) command.
ssh-keys could be good but they would use it without password which is deemed insecure.
ssh-keys could be good but they would use it without password which is deemed insecure.
First this would be to educate the users not to use it with an empty passphrase. Do you maintain also their workstations? A passphraseless private key looks different from one with any attached passphrase and can be detected by a cron-job or alike. We use only ssh-key login and disabled login by passwords. So any intruder needs at least to get his hand on a private key.
NB: Why is there no pam module for ssh-keygen like it is for passwd to impose some restrictions on the passphrase?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.