Operating System - HP-UX
1829087 Members
2598 Online
109986 Solutions
New Discussion

How to change /etc/passwd in a cluster in the 2 nodes.

 
SOLVED
Go to solution
Adm. HP
Occasional Contributor

How to change /etc/passwd in a cluster in the 2 nodes.

Hi all,
My question is how can I do change /etc/passwd in a cluster in the 2 nodes ? . I use passwd command.

And if it's possible without using NIS.


Thanks in advance.

8 REPLIES 8
Sanjay_6
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi,

Yes you can use "passwd" command. Do it on both the nodes, so that the password is same on both the system. You can run the command as root. If you are doing it as a user, you should login individually on both the node and change it.

Hope this helps.

thanks
Santosh Nair_1
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

You should be able to set the password for the accounts using the passwd command. There is no need to use NIS. Also, I believe there is no real need to have the passwords synched up (other than for manageability sake), since most of the SG commands run as root and su to the appropriate users in the scripts.

-Santosh
Life is what's happening while you're busy making other plans
Sanjay_6
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi,

If these cluster nodes you are talking about are part of NIS, then you should use "yppasswd". Otherwise use "passwd". If they are not part of NIS, you don't have to put them into NIS to change password.

But do change the password on both the systems and keep them same.

thanks
linuxfan
Honored Contributor
Solution

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi,

The easiest way is to have NIS configured, if not you might have to write a wrapper script for passwd which when invoked changes the password in all the nodes in the cluster.

Take a look at the HP doc UXSGKBAN00000227

/Begin/
Password Synchronization and MC/ServiceGuard
DocId:
UXSGKBAN00000227

Updated:
20010511


DOCUMENT

Since ServiceGuard-packaged applications can roam amongst servers, the
user will be unaware that updating a password on the packages' current
host will have no effect on other adoptive hosts of the application. For
this reason, system administrators of ServiceGuard clusters have to select
the best method to maintain passwords across multiple systems.

Password synchronization can be accomplished by the user manually updating
each host, by the use of scripts to automate the process, or by using NIS
(network information name service).

NIS configuration and management is relatively easy when compared to
configuring a MC/ServiceGuard cluster. This may prove to be the least
overhead path to the solution to a system administrator uneasy with shell
scripting. It is recommended that NIS servers be located on different
clusters to prevent a single-point of failure.

The scripting method uses either a cron job to periodically perform the
update task, or a wrapper command (a script called in place of
/usr/sbin/passwd) which updates multiple hosts when necessary (the fact
that the script was called within a package login can indicate that
multiple hosts must be updated). Either way, the core of the script will
typically use rdist or rcp to perform the copy.


/End/

Look at the HP doc for more information.

Here is another thread of similar nature
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x0df0a14d9abcd4118fef0090279cd0f9,00.html

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Deshpande Prashant
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi
If nis is not possibility, I would prefer a wrapper to passwd to allow users to change passwords on all nodes in cluster.

Prashant.
Take it as it comes.
Sanjay_6
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi Ramesh,

When you have more systems(the latest i believe is 16 systems) in a cluster, you probably should use NIS to maintain the consistency of password and other changes. But when we talk about a two node cluster, i think we can avoid the pain of managing NIS too.

Hope this helps.

thanks
Gustavo Ferraro
Advisor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi,
my solution is run a croned shell script that rcp's the /tcb/files/auth/?/ from the primary node to the secondary node.
This shell runs at 00:00 and 12:00 for logins id > 2000 {I setup application users with logins > 2000}.
The nodes must be in TCB mode.
G. Vrijhoeven
Honored Contributor

Re: How to change /etc/passwd in a cluster in the 2 nodes.

Hi Adm.

I also suggest using NIS, an other option is using a SD kit that changes the passwd string in the /etc/passwd file. This way you can easely check if the passwd is the same on both nodes.