Operating System - HP-UX
1819884 Members
2655 Online
109607 Solutions
New Discussion юеВ

passwd -l <username> command equivalent in 10.20

 
SOLVED
Go to solution
Mel Burslan
Honored Contributor

passwd -l <username> command equivalent in 10.20

HP/UX 11.x has this nice feature of issuing the command 'passwd -l ' to disable username's account immediately from the command line.

Unfortunately passwd command in 10.20 lacks this -l option. I am sure, if not the same, something in the lines of disabling an account can be done by using passwd and pwage commands on 10.20 but for the life of me, I could not figure out an easy way. Is there a cookie cutter recipe to do this somewhere in a script form or sequence of commands ?

All help is greatly appreciated
________________________________
UNIX because I majored in cryptology...
4 REPLIES 4
Sachin Patel
Honored Contributor

Re: passwd -l <username> command equivalent in 10.20

Mel,
I don't think 10.20 has such option. You can alwasy type * or something in his password fild in passwd file.
Or
change shell to /bin/false

Sachin
Is photography a hobby or another way to spend $
Michael Tully
Honored Contributor
Solution

Re: passwd -l <username> command equivalent in 10.20

The sam log produces a this string when deactiviting a user.

/usr/sam/lbin/usermod.sam -p "*" username

But the problem is there is no -p option for usermod.sam program ... What this did was to place a '*' in the encryption field. You can edit the /etc/passwd file directly and do this anyway. Use 'vipw' program.
Anyone for a Mutiny ?
Michael Steele_2
Honored Contributor

Re: passwd -l <username> command equivalent in 10.20

Mel Burslan
Honored Contributor

Re: passwd -l <username> command equivalent in 10.20

Since I am not a big fan of SAM. I forgot to check the sam logs to see how it is being done there.

Thanks for the

/usr/sam/lbin/usermod.sam -p "*"

command. it works like hot knife thru butter for me.
________________________________
UNIX because I majored in cryptology...