ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

un lock windows 2003 profile from Isieries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • un lock windows 2003 profile from Isieries

    I found a tool that will unlock locked out users on the server, but I would like to run this command from a green screen from the iseries...I would think that I could use ?FTP to connect to server and run the command...Havnt tried that but is there any other ideas out there?

    BTW this is a cool tool Ive tested it and it works great




    thanks
    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: un lock windows 2003 profile from Isieries

    When you want to run the command from AS400 green screen there are two ways...

    In first way. you will start the process from PC. Here you can use FTP to connect server and then execute command as you mentioned.

    Second way is to start the process from AS400 itself.
    Use STRPCCMD (Start PC command) command to run any commands for PC.
    I used this to open excel sheets,notepads in PC and to open a browser.
    I never tried this kind of unlocking commmands.

    Pls give a try using this command and lemme know whats happening.
    All the best !!!
    Thanks,
    Giri

    Comment


    • #3
      Re: un lock windows 2003 profile from Isieries

      I forgot to reply to this back a few years now!

      Well the network drones deleted my folder and its share.... So the whole world ended.

      Had to think back a few years, My head is hurting and I need a nap!

      PHP Code:
            * --------------------------------------------------                                          
            * 
      Program UNLOCK                                                                            
            
      Purpose Unlock the PlateBay profile on server                                             
            
      Written 10/12/06                                                                          
            
      Author  Jamie Flanary                                                                     
            
      *                                                                                             
            * 
      PROGRAM DESCRIPTION                                                                         
            
      *   this program will allow platebay server ID to                                             
            
      *   be unlocked from the floor.  Must run on PC.                                              
            *                                                                                             
            *                                                                                             
            * 
      INPUT PARAMETERS                                                                            
            
      *   Description        Type  Size    How Used                                                 
            
      *   -----------        ----  ----    --------                                                 
            *                                                                                             
            *                                                                                             
            * 
      INDICATOR USAGE                                                                             
            
      *   xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                              
            
      *---------------------------------------------------                                          
            *                                                                                             
            * 
      Procedure calls                                                                             
            
      *                                                                                             
           
      d Command         pr                  EXTPGM('QCMDEXC')                                        
           
      d  CmdString                   256                                                             
           d  CmdLength                    15  5                                                          
                                                                                                          
                                                                                                          
           d CmdLength       s             15  5                                                          
           d CmdString       s            256                                                             
           d Q               c                   
      CONST('''')                                              
                                                                                                          
            /
      free                                                                                         
                                                                                                          
                
      // strpco command and issue the net use command                                           
                // then finally run the unlock command                                                    
                                                                                                          
                  
      Monitor;                                                                                
                    
      cmdstring 'STRPCO PCTA(*NO) ';                                                      
                    
      cmdlength = %len(%trim(cmdstring));                                                   
                    
      command(cmdstring cmdlength);                                                       
                  
      On-Error *all;                                                                          
                  
      endmon;                                                                                 
                                                                                                          
                  
      Monitor;                                                                                
                     
      cmdstring 'strpccmd ' +                                                        
                     
      'net use U: \\lbi-2\unlock'                                                          
                     
      ' PAUSE(*NO) ';                                                                
                                                                                                          
                    
      cmdlength = %len(%trim(cmdstring));                                                   
                    
      command(cmdstring cmdlength);                                                       
                  
      On-Error *all;                                                                          
                  
      endmon;                                                                                 
                                                                                                          
                  
      Monitor;                                                                                
                     
      cmdstring 'strpccmd ' +                                                        
                     
      'U:/unlock.exe . {some Network ID}'                                                           
                     
      ' PAUSE(*NO) ';                                                                
                                                                                                          
                    
      cmdlength = %len(%trim(cmdstring));                                                   
                    
      command(cmdstring cmdlength);                                                       
                  
      On-Error *all;                                                                          
                  
      endmon;                                                                                 
                                                                                                          
                *
      inlr = *on;                                                                              
                                                                                                          
            /
      end-free 
      Attached Files
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: un lock windows 2003 profile from Isieries

        7 year old post - that's classic trolling technique right there ...
        Greg Craill: "Life's hard - Get a helmet !!"

        Comment


        • #5
          Re: un lock windows 2003 profile from Isieries

          Perhaps. But the thread might use updating or enhancement. The supplied program code uses STRPCCMD which requires an active emulator session. (And the emulator must support STRPCCMD.) If RUNRMTCMD (or rexec()) was used, it could get the task done without needing an emulator at all.

          The specific method used can involve security or compliance issues.

          Tom
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Re: un lock windows 2003 profile from Isieries

            But, with RUNRMTCMD or rexec() (or QShell's rexec command) you'd need to either pass a password in your CL program/shell script, or you'd need to allow incoming remote commands without passwords given. Both of these could result in a huge security hole if not handled very carefully.

            STRPCCMD doesn't have the same security risk... but, will require the active 5250 session, which isn't ideal, either.

            Comment


            • #7
              Re: un lock windows 2003 profile from Isieries

              True, but STRPCCMD can be slipped through to run against a PC without needing a password at all for that user. Depending on assets to be protected, either way can be trouble.

              Tom
              Tom

              There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

              Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

              Comment


              • #8
                Re: un lock windows 2003 profile from Isieries

                it can, but in this case the call to this program is embedded in another profile with that profile set to *SIGNOFF.

                I won't go into heavy detail here, but there is a single signon for some of the cutting stations.
                This has been the case for well over 14,000 years, and if you thought it was a task to get some
                swifty magee in accounting to change their ways, how bout you try that to a steel worker that can snap
                you neck by breathing heavy! anyway sometime late into the night someone keys incorrect password and
                disables the profile. We have another profile that a supervisor logs into and runs a program that enables
                the IBMi profile as well as the network profile.
                The network profile is used at night on a PC for training.

                both the IBMi and network profile are weak, feeble and powerless!

                With journaling and nightly reports we keep our 1 good eye on all of this daily.
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: un lock windows 2003 profile from Isieries

                  The program is understood. It's just that under some circumstances (e.g., yours) it's handy to have STRPCCMD send a command directly back to a PC running an emulator session. Under others, it's handy to have a program, very similar to yours, that sends a command directly to a server rather than needing to route through a PC emulator session.

                  Your program would be easy to modify to run in batch for example, or perhaps invoke from a browser, if you wanted to get the same kind of function done without an emulator session.

                  Tom
                  Tom

                  There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                  Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                  Comment

                  Working...
                  X