Accessing Unix from a Windows Perspective


For the two disparate systems to work together an important piece of the puzzle is securely sharing files. There are several possible ways to share files and folders between the two operating systems. The most prevalent method of sharing is emulating or hosting the native file sharing protocols of the other system.

Accessing File Services

In the case of Unix file sharing to Windows, either the native NFS shares can be accessed or use Samba, which emulates the Windows Server Message Block (SMB) sharing. These two approaches are discussed in more detail in the following sections.

Configuring Windows Client for NFS

The NFS Client that is included with SFU gives the Windows-based computer the ability to access Unix-based NFS resources. Once installed and configured the NFS client creates the ability to use UNC (\\ servername \share) style mappings. To configure the NFS client on the Windows side perform the following:

NFS

By default, Server for NFS, Client for NFS or Gateway for NFS are not part of the Services for Unix installation.


To Configure the NFS Services...

To configure the NFS services you must ensure that the server for NFS is installed and started and that the client for NFS is installed.


  1. On the Windows computer open Explorer and right-click on a directory to share and choose Sharing and Security.

  2. On the NFS Sharing tab select Share This Folder, as shown in Figure 16.14.

    Figure 16.14. NFS Sharing tab.

    graphics/16fig14.gif

  3. In the Share Name box type a name for the new share, and then choose Allow Anonymous Access.

  4. Click on the Permissions button and allow and configure the access rights, as shown in Figure 16.15.

    Figure 16.15. Setting NFS Share Permissions.

    graphics/16fig15.gif

Configuring Samba on Unix

Samba on Unix uses the /etc/samba/smb.conf as its configuration file. You need to edit this file to match your Windows environment to share files and printers. The following list shows some of the essential settings in the smb.conf file:

Encrypted Samba Passwords Required

Windows Server 2003, Windows 2000, and Windows NT 4.0 with Service Pack 3 or later require encrypted Samba passwords.


  • workgroup = <Windows Workgroup Name>

  • server string = Brief Description of Server

  • hosts allow = <single IP or subnets of allowed hosts >

  • comment = Description of the Share

  • path = /home/share/

  • valid users = usera userb userc

  • public = no

  • writable = yes

  • printable = no

  • create mask = 0765

  • encrypt passwords = yes

  • smb passwd file = /etc/samba/smbpasswd

The following command creates a Samba password file and encrypts the contents:

 
 cat /etc/passwd  mksmbpasswd.sh > /etc/samba/smbpasswd 

The new file will only be populated by user accounts. The passwords need to be set using the following command:

 
 smbpassword <username> 

smb.conf Changes

Any changes to the smb.conf file do not take effect until the Samba service is restarted.


This section only covers some of the very basic configuration settings to allow Windows users to access Unix resources shared using Samba. The detailed settings for each version of Samba are given in that version's manual (man) pages.

Accessing Print Services on Unix

On the Unix client the user can access Windows printer shares using Samba or with their native remote line printer (LPR) client. On the Windows Server 2003 platform you can use Print Services for Unix to enable the following:

  • Act as a Line Printer Daemon (LPD)

  • Remote Line Printer (LPR) client

  • Send print jobs to Unix servers

By default Print Services for Unix is not installed. To install this service you must perform the following steps:

  1. Click on Start, Control Panel, Add or Remove Programs and then select Add/Remove Windows Components.

  2. Select Other Network File and Print Services and then Details.

  3. Choose Print Services for Unix and then click OK.



Microsoft Windows Server 2003 Insider Solutions
Microsoft Windows Server 2003 Insider Solutions
ISBN: 0672326094
EAN: 2147483647
Year: 2003
Pages: 325

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net