1834194 Members
2541 Online
110064 Solutions
New Discussion

How to change password ?

 
Pepe Jimenez Muñoz
Frequent Advisor

How to change password ?

Hi,

I??m running HP-UX version 10.20 a K260 server.

All user login to the system and they can change his/her password from a shell.

Now we are designing a aplication in PowerBuilder and my question is:

How can change this users his/her password ?

Thanks.
ppviso
10 REPLIES 10
Ravi_8
Honored Contributor

Re: How to change password ?

Hi,

simple
if you are root and wanted to change user x passwd
# passwd x

if you logged in as user x
then # passwd
will do the job
never give up
Ravi_8
Honored Contributor

Re: How to change password ?

Hi,

simple
if you are root and wanted to change user x passwd
# passwd x

if you logged in as user x
then $ passwd
will do the job
never give up
Michael Tully
Honored Contributor

Re: How to change password ?

Hi,

The best way to make the user change the password is do a force change from the first attempt.

# passwd -f username

HTH
-Michael
Anyone for a Mutiny ?
Justo Exposito
Esteemed Contributor

Re: How to change password ?

Hi Pepe,

If you want to change the password from your application you must do a call system to the appropiate command (passwd), then you must look into the Power Builder in order to find the command that can call to a script or command in HP/UX.

Regards,

Justo.
Help is a Beatiful word
Pepe Jimenez Muñoz
Frequent Advisor

Re: How to change password ?

Thanks Justo,

we are in the way...

But, exist a DOS/Windows script to do it ?

Thanks / Gracias
ppviso
Steven Sim Kok Leong
Honored Contributor

Re: How to change password ?

Hi,

You can either use rsh or ssh (the secured implementation of rsh) to perform this in a DOS batch script:

@echo off
rsh -l username host passwd

Hope this helps. Regards.

Steven Sim Kok Leong
Pepe Jimenez Muñoz
Frequent Advisor

Re: How to change password ?

OK.

Thanks Steven I download some ssh clients for DOS and works fine, but passwd need to be interactive, and don??t work.

Now, I need a shell script like this:

changepasswd username password

Thnaks.
ppviso
Justo Exposito
Esteemed Contributor

Re: How to change password ?

Hola Pepe,

Te contesto en espa??ol ya que es mas sencillo para los dos.

Entiendo que estas en entorno cliente/servidor y por tanto al necesitar que sea interactivo el cambio de password, probablemente lo mas facil de hacer es que abras un telnet a la maquina como usuario de la misma y que todos los usuarios apunten al mismo .profile, en este .profile los puedes tener cautivos en un menu y que solo puedan hacer el cambio de password.

Te adjunto un .profile que te puede servir de ejemplo es sencillo y dejando s??lo la opci??n de cambio de password y cambiando alg??n literal te valdr??.

Un Saludo.

Justo.
Help is a Beatiful word
Steven Sim Kok Leong
Honored Contributor

Re: How to change password ?

Hi,

To overcome the issue that the ssh connection setup prompts interactively for password, you need to build the public-private keypairs and trust relationship between your Windows client and HP-UX server for password to be non-interactive.

For SSH1, it is identity (on client) and authorized.keys (on server). For SSH2, it is identification (on client) and authorization (on server).

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: How to change password ?

Hi,

If you are using SSH Communication's SSH2 client and SSH2 server, I have the detailed steps for non-interactive copy (SCP) here. The same trust setup and establishment is also used for non-interactive host session (SSH):

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbe69039599eed5118ff40090279cd0f9,00.html

Hope this helps. Regards.

Steven Sim Kok Leong