Automated Login?

hi everyone,

btw, this is my first post and I have done extensive searching before posting so here's the problem:

I need to be able to do two things from the dll I'm writing.
1.) move a file from our production server to our repository server
2.) verify that the file exists in the repository server.

The second thing isn't an issue and is already written and will be executed in a ksh script.

The first thing is not a problem and can be accomplished with a remote copy: rcp -r -p test.pdf drawlist@pdm-svr:/home/files/poa102. The user drawlist has been set up with permission to access the pdm-svr. This command works for one of the network guys down stairs, but for my user it does not. It tells me 'Permission is denied'. If I rlogin as drawlist and execute rcp -r -p test.pdf pdm-svr:/home/files/poa102 it obviously works.

So my question is two-fold:

  • What is preventing my rcp command (when prefacing the repository with the user) from working?
  • Would it be easier to login as the drawlist user and execute the command, and if so how could I automate the password verification? If rhosts is the answer, is there any other command/way to have an automated login?

Thanks,

Josh

Dont know... To answer we would need to know who you are when connecting and the perms settings of /home/files/poa102...

Yes but not necessarily... yes .rhosts...but ssh could also be an option (and configured as with no passwd...)

We use BaaN so the user running the session will be different every time. The majority of users will not be super users. But for the example I provided, I logged in using my regular user. I apologize for my ignorance, but what are perm settings and how/what do I access to find out what they are?

Can you please provide an example of the syntax for using ssh? When configuring for no password, is that a blanket setting or can it be set up for individual/group instances?

connect yourself to the box and cd /home/files/;
ls -ald poa10
the output should look like:
drwxr-xr-x ...
the first set of rwx is for the owner, the second for the group and the third for all others...
rwx is read write execute I let you guess the rest...
I usually give software stuff a GID (group ID) and include the athorized uid to that group and so change the directory perms to 775 or
drwxrwxr-x or even drwxrwx--x...
you could even do
drwxrwsr-x which would force whatever file is copied there to inherit the GID...

ssh without passwd is per user auth with strongkey auth with public private key exchange
the best would be for you to read the man pages or do some search to see possible confgurations and "HOWTOS"...

All the best

I'll discuss with the network guys, thanks for the help.

I just got out of bed..for this...I forgot the obvious that might solve all your automatic login problem:
What about NFS?
You wouldn't need to login nor rcp , just correct permission
All you need is to export to prodserver /home/files/poa102 and on prodserver mount the exported directory:
mount repositaryserv:/home/files/poa102 /torepos/files/102

Simple no?
Back to bed...

I appreciate the response. I'm going to ask the network guys about this to see what they say.

Thanks again for the reply,
Josh

Discussed with network guys and solved the problem by adding a .netrc file to the $HOME directory of the user (this will be done programatically every time by my baan script ' echo "machine <machine> login <login> password <password>" >> $HOME/.netrc '). After this is done I can execute 'rexec pdm-svr rcp -r -p <unix server> <repository server>' and the file is successfully transferred. btw, the unix server is running aix so the rexec command and .netrc may require different syntax for a different OS. Thanks again for the suggestions vbe.

js