[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Change password on NIS

Posted on 2011-10-03
17
Medium Priority
?
1,102 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:locster73
  • 7
  • 5
  • 4
  • +1
17 Comments
 
LVL 9

Expert Comment

by:BlueYonder
ID: 36905638
Log into the root.  Type in SU.  This will take you into super user mode to reset the password.  
0
 

Author Comment

by:locster73
ID: 36905748
the problem is it ask for the old password of the user which we do not know
0
 
LVL 9

Accepted Solution

by:
BlueYonder earned 1000 total points
ID: 36905767
Use the root password instead of the user's password for the user's password.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36905830
Did you try

passwd -r nis userid

?
0
 

Author Comment

by:locster73
ID: 36905834
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
 
LVL 9

Expert Comment

by:BlueYonder
ID: 36905863
are you on a NIS Client?
0
 
LVL 9

Expert Comment

by:BlueYonder
ID: 36905870
If you are on the NIS client, then go through the same steps on a NIS server.
0
 

Author Comment

by:locster73
ID: 36905924
@woolmikporc i have tried that and it ask for old password also
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36906001
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
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1000 total points
ID: 36906023
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
 

Author Comment

by:locster73
ID: 36906029
I log into the NIS server  which is HPUX
0
 

Author Comment

by:locster73
ID: 36906034
I see the passwd file in /var/yp can i just change the password in the password field?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36906053
No,

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

0
 

Author Comment

by:locster73
ID: 36906106
@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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36906258
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
 
LVL 9

Expert Comment

by:Amol
ID: 36909589
Try the following as root user,

example% su - [username] ( You are now that user )
example% yppasswd ( You can now change this users passwd )
0
 

Author Comment

by:locster73
ID: 36911152
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month19 days, 18 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question