1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

CLI scripting question ....

Discussion in 'TSM Client' started by tstrauch, Sep 17, 2010.

  1. tstrauch

    tstrauch New Member

    Joined:
    Jul 20, 2006
    Messages:
    4
    Likes Received:
    0
    For consistency, we have scripted the installation of TSM on our Linux servers. A fairly trivial task. I am now being asked to extend the script to automatically verify that TSM is functioning correctly. For the most part, this is also trivial if it's an upgrade to an exiting TSM installation. For installation on a new node, additional input is required and I have not been able to figure out which options (if any) to use. On every server, it asks for the node name and the PW for the node. Which options would handle those? On servers that are running e-Directory from Novell, I am also prompted for the local admin ID and PW. Are there options to provide those as well? Thanks in advance.
     
  2.  
  3. moon-buddy

    moon-buddy Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,177
    Likes Received:
    277
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    It is easy to script setting up TSM clients on servers but not that straightforward when trying to run dsmc for the first time so that passwords can be saved on the node.

    The TSM environment 'lives' on its own and would not readily accept parsed information from an external, OS level script. To cut the chase, I haven't found a practical foolproof way of entering NODE NAMES and PASSWORDS.

    Anyone?
     
    Last edited: Sep 17, 2010
  4. THE_WIPET

    THE_WIPET Senior Member

    Joined:
    May 10, 2006
    Messages:
    562
    Likes Received:
    16
    Location:
    Montreal
    i know that in windoze... it can done with a vbscript. I've automatated my client configuration throught a HTA/vbscript application... i'll ask my unix admin if he was able to "pass" the login and password into a script.

    Will be back on monday with the answer
     
  5. Canuck

    Canuck New Member

    Joined:
    Mar 24, 2008
    Messages:
    32
    Likes Received:
    1
    If it's just a shell script, after the client is configured on the TSM server and node, you can add a line to set the password with:

    dsmc set password <oldpassword> <newpassword>

    eg. if the password is adsm123:

    dsmc set password adsm123 adsm123
     
  6. moon-buddy

    moon-buddy Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,177
    Likes Received:
    277
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    I think you missed one point - how do you register the node for the first time assuming registration type = closed?
     
  7. Canuck

    Canuck New Member

    Joined:
    Mar 24, 2008
    Messages:
    32
    Likes Received:
    1
    Hmm, might not fully understand the question, but in our environment we have closed registration and just use dsmadmc in the install script to register the node / set the password on the TSM server. At the end of the script, dsmc sets the password on the node. With Windows the password can be set using dsmcutil.
     
  8. Jeff_Jeske

    Jeff_Jeske Senior Member

    Joined:
    Jul 17, 2006
    Messages:
    485
    Likes Received:
    7
    Occupation:
    Storage Engineer - DR Coordinator
    Location:
    Stevens Point, WI
    I made a batch file to register nodes on tsm servers. You pass it your username and password during the launch and it saves those items to perform additional queries. It also shows you a node count per schedule allowing you to better balance your backup load. In this case you feed it a default password like SECRET and it will change that password in 90 days. Program is called REGNODE.

    I would go to the command line and run the following command:

    REGNODE MYUSERNAME MYPASSWORD MYNODENAME NODESCHEDULE

    This is the batch file:

    echo off
    cd "C:\program files\tivoli\tsm\baclient"
    :start
    dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 select count(*) as nodes, schedule_name from associations group by schedule_name order by nodes
    set choice=
    set /p choice=Do you want to keep %4 (Y/N):
    if '%choice%'=='n' goto finsih
    if '%choice%'=='y' goto install
    if '%choice%'=='N' goto finsih
    if '%choice%'=='Y' goto install
    goto finsih
    :install
    dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 reg node %3 SECRET PASSEXP=90 USERID=none DOMAIN=STANDARD CLOPTSET=WINDOWS FORCEPWRESET=NO
    dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 def assoc standard %4 %3
    :finsih
     
  9. Jeff_Jeske

    Jeff_Jeske Senior Member

    Joined:
    Jul 17, 2006
    Messages:
    485
    Likes Received:
    7
    Occupation:
    Storage Engineer - DR Coordinator
    Location:
    Stevens Point, WI
    When installing the client on the server I use another script to detect what version of OS it is, whether it's test or prod, and what kind of storage it goes to. I then feed it to this:

    msiexec /i "z:\tsm_images\IBM Tivoli Storage Manager Client.msi" RebootYesNo="No" REBOOT="Suppress" ALLUSERS=1 INSTALLDIR="c:\program files\tivoli\tsm" ADDLOCAL="BackupArchiveGUI,BackupArchiveWeb,ApiRuntime" TRANSFORMS=1033.mst /qn"
    call notepad.exe "c:\program files\tivoli\tsm\baclient\dsm.opt"
    C:
    cd "c:\program files\tivoli\tsm\baclient"
    set P=SECRET
    dsmcutil install scheduler /name:"TSM Scheduler Service" /node:%1 /password:%P% /autostart:no /startnow:no
    dsmcutil install cad /name:"TSM Client Acceptor" /node:%1 /password:%P% /autostart:yes /startnow:no
    dsmcutil update cad /name:"TSM Client Acceptor" /cadschedname:"TSM Scheduler Service"
    dsmcutil install remoteagent /name:"TSM Remote Client Agent" /node:%1 /password:%P% /partnername:"TSM Client Acceptor" /startnow:no
    dsmcutil start /name:"TSM Client Acceptor"
    pause
    dsmc q sched
    pause
    dsm.exe
    %SystemRoot%\explorer.exe "C:\program files\tivoli\tsm\baclient"
    net use z: /delete
    exit

    The above script allows you to customize your options file - then queries the schedule and opens the GUI to ensure comms with the server and functional passwords/schedules.
     
  10. tstrauch

    tstrauch New Member

    Joined:
    Jul 20, 2006
    Messages:
    4
    Likes Received:
    0
    Jeff - Your comments would help out a lot if I had administrative access to the backend. Unfortunately, I'm a consumer, so use of dsmadmc command is not possible.
     

Share This Page