LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 08-17-2004, 02:07 AM   #1
sodhilogin
LQ Newbie
 
Registered: May 2003
Distribution: RH 8.0
Posts: 21
Thanked: 0
Disable passwd change for user account


[Log in to get rid of this advertisement]
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.
sodhilogin is offline     Reply With Quote
Old 08-17-2004, 04:33 AM   #2
pingu
Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 553
Thanked: 0
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!
pingu is offline     Reply With Quote
Old 08-17-2004, 06:28 AM   #3
sodhilogin
LQ Newbie
 
Registered: May 2003
Distribution: RH 8.0
Posts: 21
Thanked: 0

Original Poster
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.
sodhilogin is offline     Reply With Quote
Old 08-31-2004, 04:56 AM   #4
pingu
Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 553
Thanked: 0
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.
pingu is offline     Reply With Quote
Old 08-31-2004, 05:12 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :}
Posts: 18,848
Blog Entries: 1
Thanked: 160
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 05:17 AM..
Tinkster is offline     Reply With Quote
Old 08-31-2004, 07:28 AM   #6
pingu
Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 553
Thanked: 0
Ooopss....
pingu is offline     Reply With Quote
Old 09-01-2004, 01:43 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :}
Posts: 18,848
Blog Entries: 1
Thanked: 160
And, did you actually try it? :)


Cheers,
Tink
Tinkster is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
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 06:54 AM
passwd fails when trying to change user passwords tamuct Linux - Security 4 12-07-2004 01:12 PM
Disable an account for 45 minutes tonyfreeman Linux - Security 2 10-31-2004 06:01 PM
user can change passwd kelper Linux - Software 3 08-28-2003 05:17 AM
How to disable an account from remote accessing hanxuerui Linux - Security 11 07-17-2003 11:09 AM


All times are GMT -5. The time now is 11:38 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration