Synchronize passwords on multiple systems via FTP

This tip walks you through an easier process of performing tasks on multiple systems.

It's a pain if you have to perform a regular task on several systems, such as syncronyse passwords.

By using FTP (in this case on an NT command prompt), one can create scripts 'on the fly' and reduce the overhead.

These routines presume the password is already the same on all specified systems.

*** PLEASE NOTE *** even though these routines clean up after themselves, it may still be possible to recover the deleted files after use.

USE; GROUP_P user_id current_password new_password

By changing the line, echo quote rcmd chgusrprf %2 password(%4)>>script1.scr other commands can be run, i.e. STRSBS SBS(QINTER) ? however, remember these commands are effectively submitted to a btch stream, so don't try accessing anything in library QTEMP!

The user should have command line authority, and authority to the OS/400 commands used. The FTP servers should be running. It goes without saying that you should regularly review your user's authority and access *especially* if you have any of the more common daemons running.

 GROUP_P.BAT source code (modify system1 system 2 etc for valid hosts) @echo off 
call password.bat system1 %1 %2 %3
call password.bat system2 %1 %2 %3

echo passwords changed for user %1

@echo off
if exist script1.scr del script1.scr>nul

if exist temp.bat del temp.bat>nul

echo open %1>script1.scr
echo %2>>script1.scr
echo %3>>script1.scr

echo quote rcmd chgusrprf %2 password(%4)>>script1.scr
echo quit>>script1.scr

echo ftp -s:script1.scr>temp.bat
echo del script1.scr>>temp.bat

del script1.scr>nul
echo password changed for system %1  user %2 
This was first published in June 2001



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: