Useradd and passwd in HP-UX

Dear All,
I have Perl Script which previously running on solaris and now our system is moved to HP UX.

The script is creating the users on unix and database.

  1. When we are creating the new user, useradd keep newly created account in locked state
  2. In script we were using Passwd -u to unlock the account.

Now the issue is that in HP UX we don't have -u option with passwd cmd.

Can somebody guide me if we have some other utility which is replaced by passwd -u in HP UX.

Thanks

Its passwd d ... in HP-UX... look at the man pages...

2 Likes

From Solaris
-d Deletes password for name and unlocks
the account. The login name is not
prompted for password. It is only appli-
cable to the files and ldap reposi-
tories.

-u Unlocks a locked password for entry
name. See the -d option for removing the
locked password, or to set a password to
allow logins.

From HP UX

-d Allow user to login without a password by deleting it.
This option unlocks/activates the user account if found
locked/deactivated.

But the strange thing is that if i try to login with after
passwd -d username

it ask for password when i provide the password it again ask for password with Access denied message

when i do
su myuser
it does not ask for password
and when i use id command it show the

uid=132(myuser) gid=107(myc)

I think you would have to tell us more about your HPUX box: What OS version and how it is configured ( rusted? or using /etc/shadow ? etc...), how far it/they have been customized (users .profile... Custom /etc/profile etc...)
And how you connect: xterm dtterm etc... using X, or via VT ? ...

What OS version
HP-UX - B.11.31 U ia64

it configured using
/etc/shadow

We connect using
Putty

i didn't understand other things..

I just tested:

ant:/home/vbe $ date
Mon Apr 15 16:12:22 METDST 2013
ant:/home/vbe $ grep psa /etc/shadow
psa:EazGfRgdWAIj2:15771::::::
ant:/home/vbe $ passwd -d psa
ant:/home/vbe $ grep psa /etc/shadow
psa::15810::::::
ant:/home/vbe $

Then tried to connect, it logs in without asking passwd...
But this is a HP-UX 11.11 pa-risc...