Operating System - HP-UX
1848178 Members
6917 Online
104022 Solutions
New Discussion

sam and passwd on hpux 11.x and 10.x

 
Helen Gao
Occasional Contributor

sam and passwd on hpux 11.x and 10.x

Hi, all.

Program sam seems to behave differently on 11.x and 10.x in terms of using program passwd.

Do you know how does sam tell passwd which user's password to change? My customized passwd program doesn't work with sam, as if it doesn't understand the arguments passed in.

Thanks.


4 REPLIES 4
Craig Rants
Honored Contributor

Re: sam and passwd on hpux 11.x and 10.x

To determine what sam does, you can view the sam log. They may be acting differently because one may be trusted and the other not. Do either have /tcb directories?

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Ian Dennison_1
Honored Contributor

Re: sam and passwd on hpux 11.x and 10.x

/var/adm/log/samlog should show the commands being used.

Having done a quick 'man' on the 'passwd' command, I am suitably impressed at the number of options it supports.

How about this in your custom 'passwd' program? If the parameters passed do not validate against what the program expects, it passes $* (all parameters) to the real 'passwd' binary.

Share and Enjoy! Ian Dennison

Building a dumber user
Mark Greene_1
Honored Contributor

Re: sam and passwd on hpux 11.x and 10.x

The binaries are different:

from my 11.0 system, patched up through 12/2001:

-r-sr-xr-x 1 root bin 229376 Nov 7 1997 /sbin/passwd

from my 10.20 system, out of date and patched only through the Y2K patch sets (it's not a production box):

-r-sr-xr-x 1 root bin 520192 Jan 9 1998 /sbin/passwd

However, both systems show this in /usr/sam/lbin

lrwxr-xr-x 1 root sys 17 Jan 14 21:19 useradd.sam -> /usr/sbin/useradd
lrwxr-xr-x 1 root sys 17 Jan 14 21:19 userdel.sam -> /usr/sbin/userdel
lrwxr-xr-x 1 root sys 17 Jan 14 21:19 usermod.sam -> /usr/sbin/usermod

The good news is that there is a man page for each of this programs: useradd, userdel, usermod.

HTH
mark
the future will be a lot like now, only later
Helen Gao
Occasional Contributor

Re: sam and passwd on hpux 11.x and 10.x

File samlog seems fine. I enclosed the related portion in the following.

What's strange is when I changed the user's password in sam, the root's password got changed. But if I run the command as in the samlog, i.e. /usr/bin/passwd test, test's password got changed, which is correct.

Any idea?

Executing the following command:\C/usr/bin/echo "Executing passwd(1)
command
to set password for user test";/usr/bin/passwd test\C
@!@2@1013799300@0
Command completed with exit status 0.