| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 70596 | 2006-07-09 01:19:00 | Disable password expiry in Mandrake | Greven (91) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 469535 | 2006-07-09 01:19:00 | How do I disable password expiry on all accounts in Mandrake (the last version before they changed to mandriva) from command line? Google isn't being the friend it usually is - I have only been able to find out how to disable password expiry for single accounts (and even that is just a hack - setting the expiry date to a really high number - users still won't be able to change back to one of their old passwords.) |
Greven (91) | ||
| 469536 | 2006-07-09 01:32:00 | How do I disable password expiry on all accounts in Mandrake (the last version before they changed to mandriva) from command line? Google isn't being the friend it usually is - I have only been able to find out how to disable password expiry for single accounts (and even that is just a hack - setting the expiry date to a really high number - users still won't be able to change back to one of their old passwords.) Have you looked in /etc/login.defs? IIRC, there is one file that controls all passwd configuration stuff, and I think this is it. See man login.defs anyway. [Edit]: Just looked it up properly myself. Look for the directives PASS_MAX_DAYS and PASS_MIN_DAYS. Change to -1 to disable both. |
vinref (6194) | ||
| 469537 | 2006-07-09 01:44:00 | I was under the impresion that this was like the skel directory - used for default settings for new users, but has no effect on existing users. I have to modify login.defs anyway, as soon as I find a working command line editor. VI doesn't work (complains about libperl.so not existing, but when I try to install it with urpmi, it says it is already installed) & nano & pico aren't installed. I guess I will have to settle for emacs. EDIT: My bash scripting skills are really rusty. I can't remember how to write a loop to read from a file 1 line at a time untill it reaches the end. I was thinking of using that (along with cut to seperate out the username) to easily disable password expiry for all existing users (since I can't find a better way) EDIT2: While I'm setting all this up, I might as well set it up so that when you create a new user, they are automatically added to the wheel group. any idea how to do that? |
Greven (91) | ||
| 469538 | 2006-07-09 02:01:00 | Ive disabled password expiry on my user account now, but it still remembers my old passwords & won't let me reuse them. I don't want everyone having to ask me to login as root to reset their password back to what it used to be. | Greven (91) | ||
| 469539 | 2006-07-09 02:29:00 | I was under the impresion that this was like the skel directory - used for default settings for new users, but has no effect on existing users. Yes. Only affects new accounts, not existing ones. I have to modify login.defs anyway, as soon as I find a working command line editor. VI doesn't work (complains about libperl.so not existing, but when I try to install it with urpmi, it says it is already installed) & nano & pico aren't installed. I guess I will have to settle for emacs. Rpm sucks donkey's balls. This is one of the teeth-gnashing things I found with it. Libperl.so has been installed, but it is not in the rpm database. You will have to force the re-install of vi with --nodeps. See man rpm. EDIT: My bash scripting skills are really rusty. I can't remember how to write a loop to read from a file 1 line at a time untill it reaches the end. I was thinking of using that (along with cut to seperate out the username) to easily disable password expiry for all existing users (since I can't find a better way) You may be better off deleting the user accounts and re-adding them with the new login.defs settings. Be careful you do not mess up their home directories. EDIT2: While I'm setting all this up, I might as well set it up so that when you create a new user, they are automatically added to the wheel group. any idea how to do that? Use -G option with adduser. Note the capital G. See man adduser. [Edit]: Adding every new user to the wheel group is a bad idea. Why not use sudo instead? |
vinref (6194) | ||
| 1 | |||||