LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 08-17-2004, 01:07 AM   #1
sodhilogin
LQ Newbie
 
Registered: May 2003
Distribution: RH 8.0
Posts: 21

Rep: Reputation: 15
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.
 
Old 08-17-2004, 03:33 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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!
 
Old 08-17-2004, 05:28 AM   #3
sodhilogin
LQ Newbie
 
Registered: May 2003
Distribution: RH 8.0
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
Old 08-31-2004, 03:56 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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.
 
Old 08-31-2004, 04:12 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.
 
Old 08-31-2004, 06:28 AM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Ooopss....
 
Old 09-01-2004, 12:43 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And, did you actually try it? :)


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 05:54 AM
passwd fails when trying to change user passwords tamuct Linux - Security 4 12-07-2004 12:12 PM
Disable an account for 45 minutes tonyfreeman Linux - Security 2 10-31-2004 05:01 PM
user can change passwd kelper Linux - Software 3 08-28-2003 04:17 AM
How to disable an account from remote accessing hanxuerui Linux - Security 11 07-17-2003 10:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration