Link to home
Start Free TrialLog in
Avatar of Mohammed Atieh
Mohammed Atieh

asked on

Jameel

I'm used strpccmd to het the pcname and pcuser used for login to as/400
Everything is okay Except one thing
For each time I runs the cl login windows for as/400 requested to enter the username and password for as/400
The question
How i can avoid the login screen?
There is Any chance to use the user name with strpccmd
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

STRPCCMD doesn't generally cause a login prompt.  Must be caused by the pc command or script that is being run.  Can you please post:

1) The full STRPCCMD command(s) that you are executing.
2) If you are using STRPCCMD to start a script or BAT file, please post the script of BAT file.

- Gary
Avatar of Mohammed Atieh
Mohammed Atieh

ASKER

CHGVAR     VAR(&PCCMD) VALUE('START /B /WAIT RMTCMD +  
             CRTDTAARA DTAARA(' || &CURLIB |< '/' || +
             &JOB |< ') TYPE(*CHAR) LEN(16) +          
             VALUE(%COMPUTERNAME%) //' || &SYSNAME || +
             '/Z')    

when i run this from CLP on as/400 i have no problem login screen not show up when the pc return the value and crtdtaara
if the option on iseris (use defult user ID)
but if the connection option set to (prompt every time) popup login screen will show up
my environment too big i can't do change the connection option on iSeries Navigator to (use default user ID) for each PC, for that i need your help to advice me how to pass this by strpccmd
SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, you have described my problem exactly. i'm going for option (5) for now to tested
5) Set up a special IBM i User ID to use with RMTCMD.  It should be a limited capabilities user with no rights to do anything by execute a CL containing the CRTDTAARA command.  You'd need to compile the CL to adopt authority of a user with rights to execute CRTDTAARA in the target lib.  Then use specify the /user and /password parms on RMTCMD:

rmtcmd foo /system:bigblue /user:UserProfile /password:UserPassword

would you please send me the steps
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There seems to be something more going on here, so maybe more info is needed. Why send a CRTDTAARA command to a PC just so the PC can send it back to the server ("AS/400")? Why not simply run CRTDTAARA on the server and forget STRPCCMD?

Well, obviously it's because there is more to this process. The server isn't going to let a PC run commands on the server without proper authentication. So user & password (or other authentication) is going to be required. Without authentication, a remote command would be a security nightmare.

So, what is the process that needs to work? Maybe if we know the process, a good alternative can be suggested. Right now, "option 5" seems best, and Gary already gave the steps to do it. If there is a problem doing those steps, please describe what the difficulty is.
thnaks tliotta for your comment
I do that to get the PC Name & PC User Name attached client access (AS/400) and save this information on PF on as/400
i'm planing to add this cl in initial program to call  for all userprf
I would like to select option 5 but asked Mr. Gary to send me  An example of how to apply
Ah... CRTDTAARA should be populated with (%COMPUTERNAME%)... should've read in better detail. Still, is that the entire problem? It might be easier to generate a text file in a shared directory.
dear
I have no problem how to get the PC IP & PC Name & PC user name and alreday add it to PF on AS/400
what detail you want me to read
If you're asking me to actually write this for you, I'm afraid I don't have time to do that.  

I've provided you with enough information for an experienced CL programmer to come up with at least two possible "coding" solutions.

My suggestion:  read the information I have provided, look at the examples, determine the option that is best for you, and try it.  If you run into problems, post your code, and explain what isn't working.
i'm not asking for that, okay thanks
1- avoid asking iSeries user and password

i tryed with example below but don't work; i'm not able to understand in whic mode i have to pass the
system-user-password parameters .
If you can help in this i would be gratefull

  STRPCCMD PCCMD('start  RMTCMD "crtdtaara mylib/mydtaara *char 10  
/system:myiSeries   /user:myUser /password:mypass ')
You are passing a valid IBM i user and password, and not Windows credentials, right?
Believe me I don't know what that's mean anyway thanks for all your advices
Sorry: I gave you the Linux RMTCMD syntax.  It is different from Windows: Windows version doesn't allow you to specify user and password.  Relies on cached credentials of automatic prompt.  If user is configure for "Always Ask", they are going to get asked for pw with RMTCMD.

You'll want to select another method.  Might want to try the IPADDR/DIG method I described above.
it's okay, I realized that. thanks for your clarification
If you create a shared directory and a Netserver GUEST user, a simple .BAT file might be run (from the share). It might only need to echo %COMPUTERNAME% into a text file that is created in the shared directory. The file could be named with the user name concatenated with perhaps a timestamp. Potentially no user/password required.

I've only tested a Netserver GUEST a couple times a number of years ago, so it might not be useful in this case.
Dear Expert tliotta, thanks for your comment,  These ideas will not work with me because of the large size of the work environment more than 2500 users active on the system and more than 25 remote site.
I'm not clear why that would make a difference. I'd consider it a medium sized environment, far smaller than many of the larger ones. What problem does that size cause?
The question is if I adopted this method how the results are returned to the AS / 400 and stored on the PF
My target as I maintained in previous comments to have pc user pc name Pc ip client access device name and as/user profile plus date & time
I'm already reached this thorough CL  I got all above
And store it in PF. my problem only with computers having setting to iSeries navigator with connection to be promote every time in this case the login screen show up
Put if the connection on iSeries Navigator setting to use the default user everything
I need your advice for one of the following
If there is way to changes iSeries navigator for all computer remotely or to pass this sitting by My CL
Thanks
If I follow your method, you suggested in your previous comments it's required to create a map drive for the shared directory on as/400  for each computer this's what you mean if you don't mind to explain this part
Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your comment
 My situation as following
I have text file on as/400 and CL program adding  to all user profile to initiate call program to collect all informations I need for as following      PC Name, PC User, PC IP, AS400 Device name, As400 user profile, system date, system time
Everything working fine no problem
Except one thing with mapping drive from CL anyway I know the mapping drive not suitable and good choice specially our environment is too big if you have any idea to update the text file on as400 without mapping drive

Thanks