Operating System - HP-UX
1753945 Members
8463 Online
108811 Solutions
New Discussion юеВ

Re: Need clarification for some output fo "passwd" command.

 
SOLVED
Go to solution
Suraj K Sankari
Honored Contributor

Re: Need clarification for some output fo "passwd" command.

Hi,
>>How to set the aging policies for the users already created and new users.

see the example below
For new user
# useradd ├в o -u 101 \ # UID
-g users \ # primary group
-G class,training \ # secondary groups
-c ├в student user├в \ # comment field
├в m ├в d /home/user1 \ # make a home directory for the user
├в s /usr/bin/sh \ # default shell
-e 1/2/2006 \ # define an account expiration date
user1 # username

For existing user
usermod ├в e 1/2/2006 user1 # change the user├в s account expiration

Suraj
Suraj K Sankari
Honored Contributor

Re: Need clarification for some output fo "passwd" command.

Hi Again,
I am posting again because of garbage character.

>>How to set the aging policies for the users already created and new users.

see the example below
For new user
# useradd -o -u 101 \ # UID
-g users \ # primary group
-G class,training \ # secondary groups
-c "student user" \ # comment field
-m -d /home/user1 \ # make a home directory for the user
-s /usr/bin/sh \ # default shell
-e 1/2/2006 \ # define an account expiration date
user1 # username

For existing user
usermod -e 1/2/2006 user1 # change the user1's account expiration

Suraj
Sunny123_1
Esteemed Contributor

Re: Need clarification for some output fo "passwd" command.

Hi

Lookout for /et/default/security file.

http://www.docs.hp.com/en/B2355-60103/security.4.html


Regards
Sunny
senthil_kumar_1
Super Advisor

Re: Need clarification for some output fo "passwd" command.

Hi All,


Actually my server (HP-UX 11.00) is in standard mode.

But i am able to see some aging policies for some users and not for some users, is it possible.

Ex:

root@lgapps:/etc/default > passwd -s rtanney
rtanney LK 06/18/09 14 28


root@lgapps:/etc/default > passwd -s ze4egi
ze4egi PS


Pls explain me the difference.

Ganesan R
Honored Contributor

Re: Need clarification for some output fo "passwd" command.

Hi Senthil,

The two letter comes just after user name says the status of the account, where possible status are
PS=passworded;
LK=locked; and
NP=no password.

Other parameter indicates the account/password aging details.
Best wishes,

Ganesh.
Sunny123_1
Esteemed Contributor

Re: Need clarification for some output fo "passwd" command.

Hi Senthil

The date is the date the password was last set or changed,the "14" refers to the minimum days that must elapse before the password can be changed, and the "28" refers to the maximum days between changes.


Regards
Sunny
Steven E. Protter
Exalted Contributor

Re: Need clarification for some output fo "passwd" command.

Shalom,

For 11.00 the passwd -sa program is less advanced, as you already know.

The /etc/default/security implementation is possible though maybe not with sam.

Try a man page on /etc/default/security if you need more details.

This should be something we can get done.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
senthil_kumar_1
Super Advisor

Re: Need clarification for some output fo "passwd" command.

Hi All,

What am asking is that why it showing aging policies for "rtanney" and not for "ze4egi", since my system is in standard mode (but not in trusted mode.).


Pls explain me.

Dennis Handly
Acclaimed Contributor
Solution

Re: Need clarification for some output fo "passwd" command.

>why it showing aging policies for "rtanney" and not for "ze4egi", since my system is in standard mode

In standard mode, you can have password aging established. See passwd(4):
Password aging is put in effect for a particular user if his encrypted password in the password file is followed by a comma and a non-null string of characters ...

So what do the passwd entries look like for "rtanney" and ze4egi"?
Suraj K Sankari
Honored Contributor

Re: Need clarification for some output fo "passwd" command.

Hi,

Please provide the output of below commands
#passwd -s -a tanney and
#passwd -s -a ze4egi

From the man page of passwd I got this

-s [-a] Display password attributes for all users in the password file. The -a option must be used in conjunction with the -s option when no name is specified. For nisplus, this will display entries in the NIS+ passwd table in the local domain. For files, this is restricted to superuser.

Suraj