Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Another possibility: change it manually on one server. Get the encrypted password out of /etc/shadow. Now, do something like this:</p> <pre><code>for host in $HOST_LIST; do ssh $host "passwd -p 'encrypted_passwd' user" done </code></pre> <p>Of course, 'encrypted_passwd" is what you got out of /etc/shadow where you manually changed the password. And $HOST_LIST is a list of hosts where you want the password changed. That could be created simply with:</p> <pre><code>export HOST_LIST="server1 server2 server15 server67" </code></pre> <p>Or perhaps with a file (as others have suggested):</p> <pre><code>export HOST_LIST=`cat host_list.txt` </code></pre> <p>Where the file "host_list.txt" has a list of all the systems where you want the password changed.</p> <p><strong>Edit:</strong> if your version of passwd doesn't support the -p option, you might have the 'usermod' program available. The example above remains the same, simply replace 'passwd' with 'usermod'.</p> <p>Furthermore, you might consider the <a href="https://code.google.com/p/pdsh/" rel="nofollow" title="pdsh">useful tool pdsh</a>, which would simplify the above example to something like this:</p> <pre><code>echo $HOST_LIST | pdsh -Rssh -w- "usermod -p 'encrypted_passwd' user" </code></pre> <p>One last "gotcha" to look out for: the encrypted password likely contains the dollar sign character ('$') as a field separator. You'll probably have to escape those in your for loop or pdsh command (i.e. "$" becomes "\$").</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload