- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- sync password between 2 servers
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2010 12:56 PM
тАО09-10-2010 12:56 PM
I am creating a script a for Linux cluster based on Linux Heartbeat - HA....
basically I am creating a script where a user must sync his password on the 2 boxes...I mean when password for Carlos is changed on NODE01 it ill replicate on NODE02...this is where I am stuck how to replicate that.... the only thing that came to my mind was
create a scritp
something like this
echo "Please change your password"
passwd
echo "now change passwd on NODE02"
ssh node01 passwd
but it won't ask me for my password after ssh to NODE02 the script won't run...
any idea how to sync password on both nodes or how to fix my script?
thanks a lot
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 12:49 AM
тАО09-11-2010 12:49 AM
SolutionYour script could be fixed by adding the "-t" option to the ssh command line. This option will make the ssh command request a remote TTY for non-interactive sessions too. In other words:
echo "Please change your password"
passwd
echo "now change passwd on NODE02"
ssh -t node01 passwd
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 10:21 AM
тАО09-11-2010 10:21 AM
Re: sync password between 2 servers
Have you considered using something like NIS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 12:10 PM
тАО09-11-2010 12:10 PM
Re: sync password between 2 servers
I'm afraid yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 02:18 PM
тАО09-11-2010 02:18 PM
Re: sync password between 2 servers
There are probably others. LDAP (about which
I know nothing)? NIS lets a user change his
password once for all systems. It probably
has some disadvantages, too, but I'd expect
it to work pretty well.
I suspect that a Web search for keywords
like, say,
password synchonize
would probably find many shell scripts and/or
programs intended to deal with this problem
for various environments. I'd expect NIS to
be more reliable than most of them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 04:38 PM
тАО09-11-2010 04:38 PM
Re: sync password between 2 servers
I will continue searching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 06:01 PM
тАО09-11-2010 06:01 PM
Re: sync password between 2 servers
checking on a NIS configuration
do I need DNS configure for NIS to work since I see a domain name is needed?
thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2010 04:25 PM
тАО09-12-2010 04:25 PM
Re: sync password between 2 servers
I seem not to have NIS installed on my Debian
systems, so I know nothing, but on HP-UX,
these help:
man -k nis
man -k yp
man domainname
> do I need DNS configure for NIS to work
> since I see a domain name is needed?
Probably not. An NIS domain name is entirely
independent of a DNS domain name. An NIS
domain name is simply a character string. It
may contain dots, but there's no hierarchy
as there is with DNS. (Some NIS
implementations may have problems if DNS is
not used, too. I don't know if your Linux
has any problems in that case.) If you
want, you can normally use a DNS domain name
as an NIS domain name, but it's not
necessary to do so (and, as "man domainname"
explains) there may be tighter name length
restrictions for an NIS name than for a DNS
name).