Page 279 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 279

Unit 14: File Server




          The last example uses quotes about the NT username because there is a space separating the   notes
          user’s first and last names. Failure to use quotes on an NT username containing a space means
          that  Samba  will  treat  the  user’s  name  as  two  separate  UNIX  accounts;  this  will  course  the
          connections to fail.
          [bash]# vi /etc/samba/smbusers
          # Unix_name = SMB_name1 SMB_name2 ...
          root= administrator admin
          nobody = guest pc guest smb guest
          alice.jones = alice
          readonly = glen fred terry sarah

          lachlan = “Lachlan Smith”
          Further details on mapping usernames can be get in the configuration man page, type “man smb.
          conf”.

          14.6.2 sharing network Directories

          The  major  purpose  of  setting  up  a  Samba  server  is  to  provide  networked  resources  to  your
          Microsoft workstations and clients, so lets set up some resources for them to connect to and
          use.Shared resources are specified as sections within the /etc/samba/smb.conf file, the sections
          are identified by using squared brackets around each of the section names, similar to the global
          section.

          [bash]# vi /etc/samba/smb.conf
          The first share that can be configured are the home directories for all the connecting users. The
          [homes] section is a unusual configuration and Samba already knows how to handle all the users
          different home directories, it really only needs to be specified and Samba will do the rest.


                 Example:
          [homes]
          comment = Home Directory
          read only = No
          browseable = No

          valid users = %S
          The [Shared] section that we have formed below allows access to all of the files and directories
          within the /samba/shared local directory. The resource can be written to by all guest and public
          users and the resource can be viewed (browseable) by workstations and clients on the network.
          Any new directory created in the share will be specified  to the directory permissions of 777, and
          any new file will have file permissions of 666. These mask settings allow any user to save files to
          the shared directory, and any other user can read, write or delete the files.


                 Example:
          [Shared]

          comment = Global Share - All Users
          path = /samba/shared




                                           LoveLy professionaL university                                   273
   274   275   276   277   278   279   280   281   282   283   284