Operating System - HP-UX
1825787 Members
2040 Online
109687 Solutions
New Discussion

Re: Cambio de password automatico a un usuario

 
Juan Carlos González
Occasional Contributor

Cambio de password automatico a un usuario

Buenas tardes

Conoceis alguna utilidad en HP-UX 11i , que me permita cambiar la password a un usuario de forma aleatoria , de tal manera que yo la pueda implementar en el cron para que una vez al dia le modifique la password , y por ejemplo me la remita por email.

Gracias
Juan Carlos
7 REPLIES 7
Steffi Jones_1
Esteemed Contributor

Re: Cambio de password automatico a un usuario

Hello,

now I'm facing 3 challenges...
1) to dig out my knowledge of 2 years spanish in highschool about 15 years ago and
2) once translated to find the answer and then
3) give the answer in spanish :-)

1) Let me start with the translation as good as I can sum it up:
He is looking for a utility for HPUX 11.i which will change the password for a user randomly on a daily basis and will send him the result per email. All that should be started through cron.

2) Now see if I have an idea on how to help:
I don't know about a utility, but there will probably be a way to write a script which at least chances the passwords and would be able to send an email. I'm not sure about random generation of passwords, but I guess someone else here will have more ideas and can add more info :-)

3) Ok, I give up on getting it all back into spanish. It is one thing to read and understand, but another to write and be understood.
Maybe you can try to use babelfish.com or some similiar page.

Good bye and hasta la vista,

Steffi Jones

thewho?
Frequent Advisor

Re: Cambio de password automatico a un usuario

Let me step in as a translator. Steffi did an excellent job on translating the question, therefore all I'm going to do is to translate his answer to Spanish and then add my suggestions to the solution at the end:
Respuesta de Steffi --------------------------
2)No conozco utileria alguna que realize esta funcion, pero probablemente exista una manera de escribir un 'script' (programa en el sistema operativo) que al menos cambie los 'passwords' (claves),supongo que alguien aqui tendra mas ideas y a?adir mas informacion.
3) Ok, me rindo en la traduccion a espa?ol. Una cosa es leer y entender y otra que me entiendan. Tal vez deberias intentar babelfish.com o alguna pagina similar.
----------------------------------------------
Respuesta de Luis ----------------------------
ESPA?OL:
Existe una utileria /usr/lbin/modprpw que te genera un password aleatorio (p. ej. "/usr/lbin/modprpw -x dummy1", lo unico que faltaria seria crear el script que te lo envie automaticamente. De cualquier manera te recomiendo cuidado, no creo recomendable enviar passwords por correo.
Espero haber sido de utilidad.

ENGLISH:
There's a utility /usr/lbin/modprpw that generates a random password (f. ex "/usr/lbin/modprpw -x dummy"), it would only be left to write the script to automatically mail it. In any case, I must warn you that I don't think is safe to send passwords by mail.
Hope that helps,

Luis
We'll get through this together.
Abel Berger
Regular Advisor

Re: Cambio de password automatico a un usuario

Hi Juan,

Try this...Hi,

I had a shell script which invokes an awk script which was already very close; I modified it for your values and also it does not alter passwd's for users with uid < MIN_UID. You will need to set that value. NOTE: the actual passwd call is commented out so that you can test first.
===========================================
#! /usr/bin/sh
INFILE=/etc/passwd
# don't update entries less than this uid
MIN_UID=101
PW_MIN=2
PW_MAX=12
TDIR=${TMPDIR:-/var/tmp}
PID=${$}
A1=${TDIR}/x${PID}_1.awk
cat << !EOF! > $A1
{
n = split(\$0,arry1,":")
if (n > 3)
{
if (n > 3)
{
if (arry1[3] >= min_uid)
{
printf("%s\n",arry1[1]);
}
}
}
}
!EOF!
STAT=0
cat ${INFILE} | awk -f ${A1} -v min_uid=${MIN_UID} | while read X
do
echo "Updating User ${X};\c"
# passwd -x ${PW_MAX} -n ${PW_MIN} ${X}
echo " status ${STAT}."
STAT=$?
done
rm -f $A1
exit $STAT
==============================================
I hope help you !

Regards.

Abel Berger

Paula J Frazer-Campbell
Honored Contributor

Re: Cambio de password automatico a un usuario

Hi
Un servicio de traducci?n muy agradable est? aqu?:-

http://babelfish.altavista.com/tr

Bookmark lo para el referance futuro.
-------------------------------------------

A very nice translation service is here:-

http://babelfish.altavista.com/tr

Bookmark it for future referance.

Paula
If you can spell SysAdmin then you is one - anon
Juan Carlos González
Occasional Contributor

Re: Cambio de password automatico a un usuario

El problema esta en invocar al mandado password desde linea de comandos , porque pide reentrar la password

The problem this in invoking to the errand password from line of commandos, because it requests to reenter password

Juan Carlos
Abel Berger
Regular Advisor

Re: Cambio de password automatico a un usuario

Hi, juan !

Eu sou do Brasil, acho que n?s nos entedemos bem !. N?o liga para estes gringos n?o.
Eles est?o dizendo para voc? acessar el sitio
www.es-es.altavista.com
No lado esquerdo h? uma op??o "Traducir".

Un Saluto !

Abel Beger
someone_4
Honored Contributor

Re: Cambio de password automatico a un usuario

I don?t know the answer to this question at all but it is nice to see that a language barrier does not get in the way of people trying to help someone on this forum!
----------------------------------------------
Babblefish trans:
No s? que la respuesta a esta pregunta en todos sino ella es agradable considerar que una barrera lingu?stica no consigue de la manera de la gente que intenta ayudar alguien en este foro!