Change password on NIS

Hi I need to change a user password on NIS. NIS is on HPUX. the user forgot his password but when i log in as root to change the password using yppasswd it ask for the old password. Can someone show me a work around for this?

thanks.
locster73Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BlueYonderCommented:
Log into the root.  Type in SU.  This will take you into super user mode to reset the password.  
0
locster73Author Commented:
the problem is it ask for the old password of the user which we do not know
0
BlueYonderCommented:
Use the root password instead of the user's password for the user's password.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

woolmilkporcCommented:
Did you try

passwd -r nis userid

?
0
locster73Author Commented:
i did su - root
and yppasswd username
it ask for oldpassword which i don't have i tried using the root password for user but it does not work.
0
BlueYonderCommented:
are you on a NIS Client?
0
BlueYonderCommented:
If you are on the NIS client, then go through the same steps on a NIS server.
0
locster73Author Commented:
@woolmikporc i have tried that and it ask for old password also
0
woolmilkporcCommented:
Which is your client OS?

Don't know whether something similar might exist under HPUX
but under AIX we have a file /usr/lib/security/methods.cfg
where you can add this under the NIS: stanza:

options = rootrequiresopw=false
0
woolmilkporcCommented:
If anything fails you must indeed change the user's password on the NIS master to then recreate the maps
by running "make" in /var/yp

wmp
0
locster73Author Commented:
I log into the NIS server  which is HPUX
0
locster73Author Commented:
I see the passwd file in /var/yp can i just change the password in the password field?
0
woolmilkporcCommented:
No,

change the HPUX original /etc/passwd file by means of "passwd", as usual!

0
locster73Author Commented:
@woolmilkporc can you explain more  "If anything fails you must indeed change the user's password on the NIS master to then recreate the maps
by running "make" in /var/yp"

sorry as i am pretty amature on this

0
woolmilkporcCommented:
Just log in as root to the HPUX machine which is your NIS master.

Use

passwd userid

to change the user's password.
You will not have to enter the old password, because you're doing a local change.

Now cd to /var/yp. There must be a Makefile inside, please check.
If there is no Makefile you're not an a NIS master!

If there is one just run "make".

This will recreate the NIS maps (and push them to the NIS slave servers, if there are any).

That should do the trick.

0
AmolCommented:
Try the following as root user,

example% su - [username] ( You are now that user )
example% yppasswd ( You can now change this users passwd )
0
locster73Author Commented:
thanks all for the help. i finally found out using SAM would do the trick but each of you put me to the right direction.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.