Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-17-2004, 01:07 AM
|
#1
|
LQ Newbie
Registered: May 2003
Distribution: RH 8.0
Posts: 21
Rep:
|
Disable passwd change for user account
Is it possible to disable the password change for certain common account used by many users.
Have searched a lot, but could get info only about disabling user account.
|
|
|
08-17-2004, 03:33 AM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Rep:
|
I don't know which file shoul be edited, bur Fedora has a GUI for user/group administration. Here you can lock the password.
If someone knows which file, please tell us!
|
|
|
08-17-2004, 05:28 AM
|
#3
|
LQ Newbie
Registered: May 2003
Distribution: RH 8.0
Posts: 21
Original Poster
Rep:
|
In RH8.0 too there is a gui for creating the user, but there is no option to block the password changing option.
Hope someone can tell the files to be changed to disable password change option.
|
|
|
08-31-2004, 03:56 AM
|
#4
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Rep:
|
I found it!
# usermod -L
# man usermod
"-L Lock a user's password. This puts a '!' in front of the encrypted password, effectively disabling the password. You can't use this option with -p or -U"
The main problem with reading the manual is to know what to look for! I never heard of usermod before, stumbled over it in some post about some other password-issue.
|
|
|
08-31-2004, 04:12 AM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
That is NOT what you want :)
True, it stops the user from changing his
password ... in fact, it stops him from doing
ANYTHING as he won't be able to login.
What you want is
passwd -n MIN <login-name>
which won't allow the user to change the
password for MIN days.
With MIN=10000 you'd be looking at 27 odd years
before they can change it ;)
[edit]
The fourth column of /etc/shadow holds the number
of days before the password may be changed.
man 5 shadow
for details
[/edit]
Cheers,
Tink
Last edited by Tinkster; 08-31-2004 at 04:17 AM.
|
|
|
08-31-2004, 06:28 AM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Rep:
|
Ooopss....
|
|
|
09-01-2004, 12:43 AM
|
#7
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
And, did you actually try it? :)
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 02:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|