creating new user account password.

2013-01-23 Thread Fbsd8
I know I can create a new user account having a password same as the 
user name. After logging in the first time using the user account name 
as the password, I want to force the user to create a new password.

Is there a way to do that?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: creating new user account password.

2013-01-23 Thread Matthew Seaman
On 23/01/2013 20:06, Fbsd8 wrote:
 I know I can create a new user account having a password same as the
 user name. After logging in the first time using the user account name
 as the password, I want to force the user to create a new password.
 Is there a way to do that?

You can set the password to expire virtually immediately:

   pw usermod -n username -p +1m

or add the '-p +1m' bit to the 'pw useradd' line used to create the account.

I believe this will mean the user is required to set a new password on
login after the password has expired.  Might be an idea to test that though.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: creating new user account password.

2013-01-23 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 1/23/13 3:06 PM, Fbsd8 wrote:
 I know I can create a new user account having a password same as
 the user name. After logging in the first time using the user
 account name as the password, I want to force the user to create a
 new password. Is there a way to do that?


This looks like it will help: http://www.itedit.com/blog/?p=34

Regards,
Greg

- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEAR2QACgkQ0sRouByUApDN/QCgh9B23vgN7bv9otoKnt3t8dqW
30QAoLsdUgTRl6Fx0N5wEdcGZ/of3LUi
=1n+g
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: creating new user account password.

2013-01-23 Thread Fbsd8

Matthew Seaman wrote:

On 23/01/2013 20:06, Fbsd8 wrote:

I know I can create a new user account having a password same as the
user name. After logging in the first time using the user account name
as the password, I want to force the user to create a new password.
Is there a way to do that?


You can set the password to expire virtually immediately:

   pw usermod -n username -p +1m

or add the '-p +1m' bit to the 'pw useradd' line used to create the account.

I believe this will mean the user is required to set a new password on
login after the password has expired.  Might be an idea to test that though.

Cheers,

Matthew



Thank you both, Matthew and Greg

I added -p 12-12-12 as a date in the past day 12 month 12 year 12.
I tested and right after entering the account name pw I was asked for a 
new password. That is what I wanted. Matthew gave me the -p option to 
use on the pw adduser command and Greg gave me the clue to use a date in 
the past.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org