Jump to content


Photo

Force password change


4 replies to this topic

#1 xDamox

xDamox

    Linux-Noob Frequent Member

  • Members
  • PipPipPip
  • 390 posts

Posted 19 April 2006 - 02:16 PM

Hey all,

I thought I would do a little tutorial on how to force users to change their passwords when they first
login to the system.

Ok lets get started, first we will need to choose a user or create a users to enforce password chaning in my example
we will have a user called: znx ;) and we want him to change his password when he logs in.

The thing we need to do is lock the account to make sure he doesn't login until we have finished so we
can issue the following:

usermod -L znx

Now that znx's account is locked we can change the password expiry date to 0 so he will be forced
to change the password:

chage -d 0 znx

Now znx's password has expired and we can now unlock his account with the following:

usermod -U znx

Done, that's all that is require to make the user znx change his password. When znx attempts to login he will
be presented with:

You are required to change your password immediately (root enforced)
Changing password for znx
(current) UNIX password:

Notice they have to enter their CURRENT password first before having to enter a new one.

#2 hybrid

hybrid

    Linux-Noob Frequent Member

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1,009 posts

Posted 19 April 2006 - 03:54 PM

Does this work with GUIs as well? And if so, does it look nice or do users get presented with a nasty terminal window?
My website | Portfolio

FOSSwire -- all about free and open source software, featuring tips, tricks, tutorials, reviews, articles and all the latest news from the free software universe.

#3 xDamox

xDamox

    Linux-Noob Frequent Member

  • Members
  • PipPipPip
  • 390 posts

Posted 19 April 2006 - 05:38 PM

Good question hybrid,

Last time I checked it did not work with X Windows :( I even emailed shadow man of the redhat magazine no reply
tho. If you do get it working with the GUI let me know :)

#4 znx

znx

    Linux-Noob GURU

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts

Posted 19 April 2006 - 07:11 PM

a user like WHO ! .. i think this is copyright infringement :P

#5 xDamox

xDamox

    Linux-Noob Frequent Member

  • Members
  • PipPipPip
  • 390 posts

Posted 20 May 2006 - 07:10 PM

Does this work with GUIs as well? And if so, does it look nice or do users get presented with a nasty terminal window?


On fedora core five it works excellent with X Windows really well handled :)



Reply to this topic



  

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users