LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 01-26-2004, 11:42 AM   #1
vsp_123
LQ Newbie
 
Registered: Sep 2003
Location: Cincinnati
Distribution: RH 9
Posts: 5

Rep: Reputation: 0
Forcing password change at first login


Hi all,

How do I enforce users to change their passwords the first time they logon?
 
Old 01-26-2004, 12:36 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
This is one way of doing it. It forces a user to change his/her password, can be used any time you (root) want:

$ chage -d 0 -M 999 <user>

If you are using password aging you don't need the -M 999 part.
 
Old 01-26-2004, 12:40 PM   #3
vsp_123
LQ Newbie
 
Registered: Sep 2003
Location: Cincinnati
Distribution: RH 9
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks, that solved it.
 
Old 01-26-2004, 06:22 PM   #4
vsp_123
LQ Newbie
 
Registered: Sep 2003
Location: Cincinnati
Distribution: RH 9
Posts: 5

Original Poster
Rep: Reputation: 0
Hi all,

Another issue. When I do a
chage -d 0 -M 999 <username>
we are assuming that the user is going to have a direct access to the machine's console so will be prompted for a change password stuff by the system. But when the user tries this with "ssh" session, he gets bombed out when first time logging in. It asks for password first time and when he enters the right password, it says that

Server responded "Connection closed".
Connection to the remote host was lost.

and nothing more. This is because SSH does not know how to handle the change password.

Any clarifications?

Cheers,
 
Old 01-27-2004, 12:36 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
I don't understanf why it isn't working with ssh:

Changed the password for one of the users and tried to log in using ssh:

$ ssh -l someuser inferno
someuser@inferno's password:
Password changing requested. Choose a new password.
Warning: Your password has expired, please change it now
Old Password:
New password:
Re-enter new password:
Password changed

No problems whatsoever. Did you check the ssh settings?
 
Old 01-27-2004, 11:44 AM   #6
vsp_123
LQ Newbie
 
Registered: Sep 2003
Location: Cincinnati
Distribution: RH 9
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry. I forgot to mention that the SSH that I was talking about is the ssh client on windows side. Do you think it will still work if somebody tries to connect from a windows box to this linux ws using ssh client?
i was not successful atleast.
Please reply when convenient. Thanks

Cheers,
 
Old 01-27-2004, 11:57 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
I haven't used windows in over 5 years, so windows related questions I cannot (or hardly) answer. I will give it a try:

I've heard about a program called putty that is suposed to be a good ssh client for windows.

Will it allow users to change their password? I really don't know. But if I guess it seems logical that it should. Passwords should change on a regular base and if your only access is an ssh client.......
 
  


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
SSH Login - Forcing keys! jackster Linux - Security 5 01-25-2005 08:09 AM
Password Check is Passwords Skipped in Login Screen, Root System Settings Change in X edwardt Red Hat 1 07-06-2004 11:46 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 09:39 AM
Change password on first login mneves Linux - General 2 04-20-2004 04:10 AM
Just change Samba password, not Unix password? sorrodos Linux - Networking 1 08-14-2003 07:52 PM


All times are GMT -5. The time now is 09:52 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration