Tip

Synchronize passwords on multiple systems via FTP

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

PASSWORD.BAT source
@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
temp.bat

del script1.scr>nul
echo password changed for system %1  user %2 

This was first published in June 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.