On Tue, 11 Mar 2003, Jacob Meuser wrote:
>On Mon, Mar 10, 2003 at 11:41:27PM -0800, Mr O wrote:
>> Also, can I restrict
>> a users ability to change the password?
>
># chmod o-x `which passwd`
># chmod o-x `which chpass`
>
>Careful with those ;>
Sheesh...that's a bit extreme, isn't it?
If you're using shadow passwords (and you probably are, unless your Linux
distribution is really old), there's a much better way to prevent passwords
from being changed:
chage -m <days> <username>
This sets the minimum number of days before the indicated user is allowed
to change their password. Choosing a sufficiently large number of days
effectively prevents the user from ever changing their password. For
example,
chage -m 36524 fred
forces "fred" to wait 100 years before his password can be changed.
Of course you have to be root in order to use the chage command.
The chage command has several other interesting options. Read "man chage"
and "man 5 shadow" to learn all about what's going on.
- Neil Parker
_______________________________________________
Eug-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug