Operating System - Tru64 Unix
1752282 Members
4576 Online
108786 Solutions
New Discussion юеВ

Lookig for Tru64 equivalent of a command in HPUX

 
Mel Burslan
Honored Contributor

Lookig for Tru64 equivalent of a command in HPUX

In HP-UX, we have a command to replace the encoded password of a user with

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

It is sort of an obscure command with no documentation, but it is there and it works,
which effectively sets the password without having to know what the clear text form of the password is.

I am wondering if such a command/script is available for Tru64 as well ? I am also interested in finding this for solaris but not as important as Tru64 at the moment.

The catch is, it needs to run on both trusted and untrusted systems.

Thanks in advance.
________________________________
UNIX because I majored in cryptology...
6 REPLIES 6
Ralf Puchner
Honored Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

the given command is unsupported for hpux and may change/removed without notice in future versions. Due to this fact there is no official tool from HP for Tru64.

Use passwd (official) or a grep/sed script (unsupported) to change the password.


Help() { FirstReadManual(urgently); Go_to_it;; }
Michael Schulte zur Sur
Honored Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

Hi,

and there is also the vipw command. :-)

greetings,

Michael
Ann Majeske
Honored Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

If you're interested in writing your own program, you should look into using the SIA routines. See the Security or Security Programming manual and the sia* man pages.

Ann
PeterWolfe
Respected Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

Mel,
There is also an undocumented way on Tru64
although it uses the clear text password:

usermod -p user
New password:
Retype new passwd:

so it's simple to script this and that's
what some of the account management tools
use
Hein van den Heuvel
Honored Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

Well, it hardly seems worth a dedicate tool. Uou could just use the editor of your choice on /etc/passwd (make backup!) and then do 'mkpasswd'

In the test i did to verify this, I use perl as the editor, but sed or vi or awk or edit can be used of course.

> grep hein /etc/passwd
hein:A2vaDBJeW8Xrg:203:15:Hein van den Heuvel:/hein:/bin/ksh

> passwd hein
Changing password for hein.

New password:
Retype new password:
root at kelrin> grep hein /etc/passwd
hein:PMqdrIlnFLWA2:203:15:Hein van den Heuvel:/hein:/bin/ksh


>perl -i -p -e 's/^hein:\w+:/hein:A2vaDBJeW8Xrg:/' /etc/passwd

>mkpasswd /etc/passwd
27 password entries (longest entry is 87 bytes long)
root at kelrin> rlogin -l hein 0 ....


hth,
Hein.
PeterWolfe
Respected Contributor

Re: Lookig for Tru64 equivalent of a command in HPUX

Hein,

The usermod -p way should work for both
for C2 and base security (not that it would
be incredibly harder to extend your
perl for C2).