LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
 
Search this Thread
Old 12-16-2006, 10:26 AM   #1
guy_ripper
Member
 
Registered: Oct 2006
Posts: 80

Rep: Reputation: 15
automatically prompt user to change password


Hi...

I'm thinking to ask this in the forum regarding automatically prompt new user to change password upon logging in. Users are being authenticated by LDAP server using Fedora 6 and I used webmin so that I could get a gui interface....

Any ideas are welcome.. Thanks....
 
Old 12-17-2006, 03:10 PM   #2
derekalan18
LQ Newbie
 
Registered: Sep 2005
Location: Michigan
Distribution: SuSE KDE
Posts: 26

Rep: Reputation: 15
if you want them to be prompted to change their password when logging in, just change their log-in shell to /bin/passwd
 
Old 12-17-2006, 06:12 PM   #3
sysinit.d
Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 0
Really, and what happens after they change their passwords. Do you think they will get any shell to work on ater that? And do you really want the users to change their passwords every-single-day!!??

I guess the question was to force users to change their passwords on their first logon attempt and not all the damn they login ...

Rite mate?


Quote:
Originally Posted by derekalan18
if you want them to be prompted to change their password when logging in, just change their log-in shell to /bin/passwd
 
Old 12-18-2006, 12:38 AM   #4
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Hey Guy_Ripper,
You might want to look at this link....
http://www.die.net/doc/linux/man/man1/chage.1.html

I quote the relevant stuff here...
====================================================================================
-E, --expiredate EXPIRE_DATE
Set the date or number of days since January 1, 1970 on which the user's account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again.
====================================================================================
 
Old 12-23-2006, 08:40 PM   #5
sysinit.d
Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 0
Check "chage" man pages ...


Ya true ... if u want the users to be prompted for changing their passswords on their first logon attempt, just expire all user accounts, so that they will prompted to change their passswords on their first logon attempt

do this >>

chage -E 0 user_name (This will expire the user, cuz 0 stands for Jan 1,1970)

chage -E -1 user_name makes the user account expire NEVER

chage -E YYYY-MM-DD .. use this to expire the user account on the day you want it to ...

Just check out the manual page for the chage command ... that would fit all ur requirements I am sure ...

thanx

SysInitD
 
Old 01-17-2007, 11:02 AM   #6
mbradbones
LQ Newbie
 
Registered: Oct 2005
Posts: 5

Rep: Reputation: 0
This is fine if you want the user to have to contact the system admin to change their password.

"-E, --expiredate EXPIRE_DATE
Set the date or number of days since January 1, 1970 on which the user's account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again. "

How can one force a password change so the user can enter the new password without contacting the admin?

Like on HPux or Sun systems(not 5.8 - bug), you can use the passwd -f userid, thus when user logs in and enters the temporary password, they are then prompted to enter a new password.
 
Old 01-18-2007, 10:26 AM   #7
mbradbones
LQ Newbie
 
Registered: Oct 2005
Posts: 5

Rep: Reputation: 0
Got my answer, saw another thread and used mix of -d, -M
newbie am I
 
Old 01-18-2007, 01:57 PM   #8
mbradbones
LQ Newbie
 
Registered: Oct 2005
Posts: 5

Rep: Reputation: 0
This is what I have found to work:

chage -M 90 -d 0 user_id

The -M 90 - sets password to expire every 90 days
The -d 0 - Sets the last date password was changed, in this case it is 01-01-1970

Use chage -l user_id to see the settings.

Know that all you experts out there think this is dumb post, but I hope to help other newbies
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do you change login/password prompt? cnewtonne Linux - Security 7 11-16-2006 02:54 PM
add a user with password without prompt grendel-IT Linux - Software 7 09-27-2006 02:07 PM
How to force a user/password prompt to logon? binary66 Puppy 5 09-08-2006 05:50 AM
how can I customise my login to avoid prompt for user and password? krmane Slackware 6 07-13-2006 10:35 AM
add user prompt for password on login redir Linux - Newbie 2 02-28-2005 11:01 AM


All times are GMT -5. The time now is 05:30 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration