CIFS9000 Overview


CIFS/9000 Overview

CIFS/9000 Server is an HP product based on Samba that provides file and print services to CIFS clients. The server is an HP 9000 and the clients are usually Windows-based systems; however, the client could also be an HP 9000 or any system running CIFS client software. CIFS/9000 Client is used to access file and print services on a CIFS server. To an HP-UX user running CIFS/9000 Client software, the shares on CIFS/9000 Server look like UNIX filesystems whether they are on a UNIX server or a Windows server. The server could be an HP 9000 running CIFS/9000 Server, a Windows-based system, or any system running CIFS as a server. In this chapter, I'll cover only CIFS/9000 Server being accessed by a Windows-based system since that is the use for which most HP 9000 users will deploy CIFS/9000.

CIFS stands for Common Internet File System, which is a Windows specification for remote file access. CIFS is a remote access protocol based largely on Server Message Block (SMB), which has long been used as the native file-sharing protocol on Windows-based systems. CIFS is a remote file access protocol that sits on top of the host file system(s). As mentioned earlier there is both a CIFS Server, for which I'll use an HP 9000 system in this chapter, as well a CIFS Client, for which I'll use a Windows-based system in this chapter. We'll set up CIFS/9000 server such that an HP-UX file system can be mounted on a Windows-based system.

CIFS/9000 Server is based on Samba open source software. For that reason, the second half of this chapter is from one of my other books covering Samba running on a Linux system. The HP 9000 setup of CIFS/9000 Server covered in the first half of this chapter is very similar to the Samba setup on a Linux system covered in the second half of this chapter.

My goal in the first half of this chapter is to give an overview of the setup of CIFS/9000 and demonstrate a subset of its functionality. We'll focus on the file server functionality only. We'll set up shares on the CIFS/9000 server system that will appear as a drive letters and icons on a Windows system.

CIFS/9000 Server provides this file-sharing functionality using Server Message Block (SMB) protocol as described earlier. SMB runs on top of TCP/IP. In our example in this chapter, both the Windows system and CIFS/9000 Server system are running TCP/IP and SMB. These provide all of the technology that is required to establish file sharing between the two systems.

Chapter 13 covers the Network File System (NFS) running on a Windows system and accessing files on a UNIX system. This functionality is similar to that which we'll cover with CIFS/9000 in this chapter. In addition to the file-sharing capability, CIFS/9000 also provides printer sharing and additional user access control capability. We won't focus on these capabilities in this chapter; however, CIFS/9000 does indeed provide some advanced functionality in these areas.

At the time of this writing, CIFS/9000 contains the functionality just mentioned, including: file-sharing; printer sharing; and advanced user access control of files. There are many advancements taking place with Samba that will be incorporated into CIFS/9000 and other software provided under the GNU Public License (GPL) as free software. Because the software is free, many people have access to it and spend time enhancing the software. For this reason, you may find that additional functionality is included in CIFS/9000 in the future.

Installing CIFS/9000

CIFS/9000 is loaded from CD-ROM like any other HP application. Figure 15-1 shows the swinstall screen with the two CIFS/9000 components that are part of the parent bundle. As shown in the figure, you receive both the source code and the compiled version of CIFS/9000 Server as one bundled product. The same would be true of the CIFS/9000 Client software. The source code is included because CIFS/9000 Server is based on Samba Open Source software for which source code is freely available.

Figure 15-1. Installing CIFS/9000 Server with swinstall

graphics/15fig01.jpg

After having installed both components of the parent bundle shown in Figure 15-1, we have all of the software present on our system to configure CIFS/9000 Server. Although I don't plan on modifying the source code, I may view it at some point, so I loaded it as well.

Let's next change directory to /opt (for optional software) and see what directories have been created in the following listing:

 #  cd /opt  #  ls -l  total 10 dr-xr-xr-x   6 bin        bin             96 Jul 11 19:27 audio dr-xr-xr-x  10 bin        bin           1024 Jul 11 19:27 dce dr-xr-xr-x   4 bin        bin           1024 Jul 11 19:44 dcelocal dr-xr-xr-x   3 bin        bin             96 Jul 11 19:25 fc dr-xr-xr-x   3 bin        bin             96 Jul 11 19:18 fcms dr-xr-xr-x   4 bin        bin             96 Jul 11 19:44 graphics drwxr-xr-x   5 root       sys             96 Jul 11 19:29 hparray dr-xr-xr-x   4 bin        bin             96 Jul 11 19:27 ifor dr-xr-xr-x  16 bin        bin           1024 Jul 12 13:10 ignite dr-xr-xr-x   3 bin        bin             96 Jul 11 19:26 image drwxr-xr-x   2 root       root            96 Jul 11 19:14 lost+found dr-xr-xr-x   7 bin        bin             96 Jul 11 19:25 nettladm drwxr-xr-x   2 root       sys           1024 Jul 11 22:57 networkdocs dr-xr-xr-x   7 bin        bin             96 Jul 11 19:27 pd drwxr-xr-x   8 root       users         1024 Jul 18 11:53 samba drwxr-xr-x   3 root       users           96 Jul 18 11:53 samba_src dr-xr-xr-x   5 bin        bin             96 Jul 11 19:25 upgrade dr-xr-xr-x   4 bin        bin             96 Jul 11 19:27 video drwxr-xr-x   3 root       sys             96 Jul 12 13:10 webadmin # 

This listing shows that there are both the samba and samba_src directories that we loaded in /opt . The CIFS/9000 product with which we'll be working is loaded in the samba directory, so let's change to it and then see what files and directories are present under /opt/samba and /opt/samba/bin :

 #  ls -l /opt/samba  total 44 -rwxr-xr-x   1 root       users     17982 Jul  7  1999 COPYING drwxr-xr-x   4 root       users        96 Jul 18 11:53 HA -rwxr-xr-x   1 root       users       772 Jan 10  2000 README drwxr-xr-x   2 root       users      1024 Jul 18 11:53 bin drwxr-xr-x   7 root       users      1024 Jul 18 11:53 docs drwxr-xr-x   6 root       users        96 Jul 18 11:53 man drwxr-xr-x   2 root       users      1024 Jul 18 11:53 script drwxr-xr-x   6 root       users        96 Jul 18 11:53 swat #  ls -l /opt/samba/bin  total 13588 -rwxr-xr-x   1 root       users      1708 Apr 20 17:38 addtosmbpass -rwxr-xr-x   1 root       users      446 Apr 20 17:38 convert_smbpasswd -rwxr-xr-x   1 root       users    292124 Apr 20 17:38 make_printerdef -rwxr-xr-x   1 root       users    292115 Apr 20 17:38 make_smbcodepage -rwxr-xr-x   1 root       users    579513 Apr 20 17:38 nmbd -rwxr-xr-x   1 root       users    402933 Apr 20 17:38 nmblookup -rwxr-xr-x   1 root       users    752117 Apr 20 17:38 rpcclient -rwxr-xr-x   1 root       users     12988 Apr 20 17:38 samba_setup -rwxr-xr-x   1 root       users    476863 Apr 20 17:38 smbclient -rwxr-xr-x   1 root       users   1302921 Apr 20 17:38 smbd -rwxr-xr-x   1 root       users    707074 Apr 20 17:38 smbpasswd -rwxr-xr-x   1 root       users    402929 Apr 20 17:38 smbspool -rwxr-xr-x   1 root       users    324986 Apr 20 17:38 smbstatus -rwxr-xr-x   1 root       users      4862 Apr 20 17:38 smbtar -rwxr-xr-x   1 root       users      1860 Apr 20 17:38 startsmb -rwxr-xr-x   1 root       users      2340 Apr 20 17:38 stopsmb -rwxr-xr-x   1 root       users    789251 Apr 20 17:38 swat -rwxr-xr-x   1 root       users    288012 Apr 20 17:38 testparm -rwxr-xr-x   1 root       users    312629 Apr 20 17:38 testprns #  export PATH=$PATH:/opt/samba/bin  # 

There are some files in /opt/samba/bin of interest. Let's take a look at one of these used to configure CIFS/9000 in the upcoming section.

Configuring CIFS/9000

Among the executables that appear in the /opt/samba/bin directory is samba_setup . When you run this program, it performs some of the initial CIFS/9000 setup, including the name of the domain or workgroup and selecting the authentication to be used. Authentication gets a little tricky because you have a few options. The Samba part of this chapter covers some of the authentication issues. Let's now run samba_setup :

 #  samba_setup  This is a utility to help you configure your HP-UX system as a SAMBA server.  This should only be run once after the initial installation of SAMBA. Do you wish to continue with the configuration? (Y or N)?  :  y  Proceeding with samba_setup... You now must choose what level of authentication you would like this SAMBA server to use: 1) domain 2) server 3) user 4) share 5) CANCEL #?  3  You have chosen user level authentication Is this correct? (Y or N)?  :  y  Enter the name you wish the SAMBA server to be known as (the netbios name), or just hit enter if you want to keep the default server name (l1): Enter the name of the domain or workgroup that you want this SAMBA server to be a part of:  users  Configuring SAMBA server with user level authentication... Your SAMBA server should now be ready to start. You may wish to put /opt/samba/bin in the PATH for root so that you don't have to type the fully qualified path name for the SAMBA utilities and commands. # 

The minimal configuration we completed, along with information related to the Samba configuration, is in /etc/opt/samba/smb.conf , which is shown in the following listing:

 #  cat   /etc/opt/samba/smb.conf  # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options (perhaps too # many!) most of which are not shown in this example # # Any line which starts with a ; (semi-colon) or a # (hash) # is a comment and is ignored. In this example we will use a # # for commentry and a ; for parts of the config file that you # may wish to enable # # NOTE: Whenever you modify this file you should run the command "testparm" # to check that you have not many any basic syntactic errors. # #======================= Global Settings ======================== [global]    netbios name = l1 # workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4    workgroup = users # server string is the equivalent of the NT Description field    server string = Samba Server # this tells Samba to use a separate log file for each machine # that connects    log file = /var/opt/samba/log.%m # Put a capping on the size of the log files (in Kb).    max log size = 1000 # Security mode. Most people will want user level security. See # security_level.txt for details.    security = user # Use password server option only with security = server or domain    password server = * # You may wish to use password encryption. Please read # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # Do not enable this option unless you have read those documents   encrypt passwords = no # Most people will find that this option gives better performance. # See speed.txt and the manual pages for details    socket options = TCP_NODELAY # Browser Control Options: # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply    local master = no    read only = no    preserve case = yes    short preserve case = no    dos filetime resolution = yes    syslog = 0 #============================           Share            Definitions ============================== [homes]    comment = Home Directories    browseable = no # This one is useful for people to share files [tmp]    path = /tmp # 

You can modify this file directory to make changes for your environment.

In order to run CIFS/9000, we need to start the Samba server. This is done manually with the startsmb program as shown in the following listing:

 #  /opt/samba/bin/startsmb  Samba started successfully; process ids: smbd: 25363, nmbd: 25361 #  ps -ef  grep samba  root 25363     1  0 12:10:45 ?         0:00 /opt/samba/bin/smbd -D     root 25361     1  0 12:10:45 ?         0:00 /opt/samba/bin/nmbd -D # 

We have successfully started the Samba server with startsmb , as confirmed by the Samba daemons shown in the ps output. We want to start Samba every time our system boots, so we can modify the /etc/rc.config.d/samba file and change the value of RUN_SAMBA to 1, as shown in the following listing:

 #  pwd  /etc/rc.config.d #  cat samba  # # (c) Copyright Hewlett-Packard Company 1999 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # samba configuration: set RUN_SAMBA to a non-zero value to # initiate the SAMBA server at run level 2. # # Installed at /etc/rc.config.d/samba # RUN_SAMBA=1 # 

Up to this point, we have loaded CIFS/9000 using swinstall , performed some minimal configuration, and started Samba. The entire process has taken only minutes and we're ready to use CIFS/9000.

Now that we have loaded Samba and performed the initial configuration, we'll move to our Windows system and access an HP-UX file system on the Windows system as if it were local.

Map a Network Drive

Although we haven't done much work, we're now ready to map a network drive on our Windows system to an HP-UX file system.

Let's map the root file system on our CIFS/9000 server to F: on our Windows system, as shown in Figure 15-2:

Figure 15-2. Map Root FileSystem on CIFS/9000 Server to F :

graphics/15fig02.jpg

We now have access to the root filesystem on our CIFS/9000 server (10.1.1.11), as though it were local to our Windows system. Figure 15-3 shows accessing F: , which is root on our CIFS/9000 Server, to view the files and directories:

Figure 15-3. Viewing HP-UX Root Filesystem as F: on Windows

graphics/15fig03.jpg

We can also use the net view command on our Windows system to see both the root filesystem on our CIFS/9000 server, which we have mapped to F: as well as tmp , which was in smb.conf but was not mapped to a drive letter, as shown in the following listing:

 C:\>  net view \10.1.1.11  Shared resources at \10.1.1.11 Samba Server Share name     Type     Used as    Comment ------------------------------------------- root           Disk     F:         Home Directories tmp            Disk The command completed successfully. C:\> 

We have only scratched the surface of CIFS/9000 functionality in this section. The subjects of user authentication, printing, ACLs, and many other topics were not covered. The next section covering Samba on Linux includes some additional sections of interest, such as the Web-based configuration tool for Samba called SWAT, that you may want to review. There are some documents on docs.hp.com that contain more detailed information on CIFS/9000 that you'll want to download and print if you plan to use CIFS/9000 in your environment.



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

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