1838721 Members
5455 Online
110129 Solutions
New Discussion

Question with Samba

 
Jeffrey F. Goldsmith
Super Advisor

Question with Samba

Here is my question:
One of my programmers wants to be able to copy files from my UNIX server over to one of our Windows 2000 servers. She would like this to be automated to keep anyone from forgetting to move them manually. My UNIX server has HP-UX 11.i so I installed Samba and got it configured. That part seems to work fine.
The problem that I am having is that we want to use task scheduler on the server to copy the files. We logged into the server with an administrative name and password and setup the task scheduler to run the job. Everything works just great until we log out from the server.
When we logout of the server the scheduled task runs but isnâ t able to connect to the UNIX server. Is there a way to perform this task without having to be logged into the UNIX server? We would really like to use Samba but if we cant get this to work we will have to find an alternate way to move the files.

Thanks for the help.

Je
6 REPLIES 6
Vijaya Kumar_3
Respected Contributor

Re: Question with Samba

I was confused little bit !!!

If you want to transfer files from NT to UNIX Server, you can map the file system and do your work. I dont see a way to have the drive permanent...but you connnect using Citrix connection and Do a "Disconnect" option instead of "Log Off" once you mapped the drive... that leave the drive for the user and run your job

Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Jeffrey F. Goldsmith
Super Advisor

Re: Question with Samba

Let me try to explain it again. I want to transfer files from my UNIX server to my Windows 2K server. I installed Samba on my UNIX server and created a user on that server with the same name that I use as my Administrator name I use on my Windows 2K server.

I created a cron job to copy the required files from their current location on the UNIX server to a new folder.
I created a batch job to copy the required files from their location on the UNIX server to a new location on the Windows 2K server. With task schedular I set up the batch job to be run every morning.

The problem is if someone else come into the server room and logs into this Windows 2K server as a different user/Administrator and leave it that way then when the scheduled task runs it isn't able to touch the UNIX server to copy the files.

The question remains, is there a way for me to copy the files from the UNIX server to my Windows 2K server without worrying about which user is loged into the Windows 2K server. Can I use Samba or do I have to figure out another way to get the files copied?

Hope that clears up the confusion.
Geoff Wild
Honored Contributor

Re: Question with Samba

Why not just setup ftp on the W2K server and have the user ftp the files? or you can script/cron it as well....


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Darren Prior
Honored Contributor

Re: Question with Samba

Hi,

I think there could be an easy solution to your problem. Instead of relying on having a drive mapped when your scheduled task runs, why don't you use "net use" to map it as part of the scheduled task.

regards,

Darren.
Calm down. It's only ones and zeros...
Jeff_Traigle
Honored Contributor

Re: Question with Samba

Jeff, I'm a little confused how having a user logged on the Windows side could affect your transfer. How are you doing that through Samba exactly?

At my previous job, I set up a Red Hat Linux web server with Samba and copied the web site files to an NT server to be sure they got backed up every night. The cron job ran a script that used smbmount to mount the location and then smbunmount to unmount it when the cp was complete. (I think those were the correct commands... can't find them on my current HP systems, but they only have the CIFS Server software loaded so I assume HP bundles the client side portions separately.)

It didn't matter if anyone was left logged on the Windows server with a different account or not. The only bad thing about it is that it leaves a plain text password in a script, which isn't generally a good idea.
--
Jeff Traigle
Stefan Pendl
Valued Contributor

Re: Question with Samba

To check if I understand what you are doing:
1) copy by cron to a samba share on UNIX
2) copy by scheduler to new location on W2k
=> not working as expected

Another way:
1) copy by cron to temporary samba share with map bad user to guest and guest allowed on UNIX
2) copy from temporary storage (net use inside batch file) to new location on Win2k
3) if copy OK remove files from temporary storage and disconnect (net use /delete inside batch file)

This should be user independent without any influence of currently logged users.
If you like to check if the UNIX copy is finished use a file, if this file exists Win2k can start to copy!

HTH,
Stefan
Programing is fun.