I was tasked with providing a batch script to copy the output of a SQL report to a Unix server. I have used FTP to copy the output of a Unix cron job to a windows where it was picked up by SQL maintenance job and then stored to a database. I have installed WSFU but I never got into the nuts and bolts of configuring the service. This time I did. You can download WSFU 3.5 here http://www.microsoft.com/downloads/en/details.aspx?FamilyID=896c9688-601b-44f1-81a4-02878ff11778 Windows 2008 has WSFU built in as a feature. I believe that you do not have to reboot after the install of WSFU 3.5 but it always a good measure to do so anyway. There are a few caveats after the install. One of them is that none of the services that need to be started are started. The most important of services that need to be started are: Client of NFS and User Name Mapping. The first of which allows the windows-base computer/serve to connect to the Unix NFS. The second of which will map Unix names spaces and Windows name spaces, which is just as important to my task as the first service. There is another server which is, Server for NFS which you don not have to worry about unless you want your Windows box to act as an NFS host. After you have WSFU installed and the services enabled your next step is opening Windows Services For Unix Admin Console.
You can pretty much use the default here the only thing that is important for what I needed was user name mapping. The password and group files you must get from the Unix server guys. You can put the ASCII files in any directory just browse to the locations and chose the apply button at the top. One problem you may run into is if the User Name Mapping service is not turned on. If it is not turned on you will not be able to map any users or groups. If you tab over to Maps and click on the show user hyper link and you get the list windows user names and list UNIX user names buttons then you are good to go. If you get an error then you know that you need to go back and turn on User Name Mapping service.
Basically all I needed to do was to use the Net Use command to map to the Unix server and copy the file over. At this point no more was needed on the windows side but when I did my net use command in the command line window I got a 67 network not found error. I found a good link for troubleshooting NFS client issues http://technet.microsoft.com/en-us/library/cc772500.aspx So I did a showmount -e (server name) and I saw that the Unix server was not configured to allow connections to my Windows Server. I told the Unix guys and they added to windows server to the Unix host file then extracted the Unix mount point to my Windows box. I tried Net Use command again. Initially I used the the ip to map a drive to the Unix share and that worked but after the first map by IP the name resolution started working. Now the easy part -- writing the batch!
You can pretty much use the default here the only thing that is important for what I needed was user name mapping. The password and group files you must get from the Unix server guys. You can put the ASCII files in any directory just browse to the locations and chose the apply button at the top. One problem you may run into is if the User Name Mapping service is not turned on. If it is not turned on you will not be able to map any users or groups. If you tab over to Maps and click on the show user hyper link and you get the list windows user names and list UNIX user names buttons then you are good to go. If you get an error then you know that you need to go back and turn on User Name Mapping service.
Basically all I needed to do was to use the Net Use command to map to the Unix server and copy the file over. At this point no more was needed on the windows side but when I did my net use command in the command line window I got a 67 network not found error. I found a good link for troubleshooting NFS client issues http://technet.microsoft.com/en-us/library/cc772500.aspx So I did a showmount -e (server name) and I saw that the Unix server was not configured to allow connections to my Windows Server. I told the Unix guys and they added to windows server to the Unix host file then extracted the Unix mount point to my Windows box. I tried Net Use command again. Initially I used the the ip to map a drive to the Unix share and that worked but after the first map by IP the name resolution started working. Now the easy part -- writing the batch!
No comments:
Post a Comment