Using Samba as a fileserver for PCS

On the Fedora Core 4 system my /etc/samba/smb.conf is setup as follows


[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WGHOME1

# server string is the equivalent of the NT Description field
   server string = Scoobay Samba Server

# Machines on local network
   hosts allow = 192.168.1. 192.168.2. 10.1.1. 127.

# Separate log for each machine
   log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Security mode.
   security = user

# Password encryption
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd

# Most people will find that this option gives better performance.
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

#============================ Share Definitions ==============================
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[share]
   comment = Data Programs Etc
   path = /mnt/share/data
   public = yes
   writable = yes
   printable = no
   create mask = 0640
   directory mask = 0770
   write list = @shares


[media]
   comment = Music Video Etc
   path = /mnt/share/media
   public = yes
   writable = yes
   create mask = 0640
   directory mask = 0770
   printable = no
   write list = @shares

Users who are going to have full access to the shares are added to the shares group

useradd -u <username> -g <defaultgroup> -G shares ......

The users are then added to samba’s list of users.

smbpasswd -a <username>

The above username and passwords musts match those on the client system accessing the shares.

Next i test the smb.conf parameters, enable, start and test the samba server


# testparm 
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[share]"
Processing section "[media]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

CTRL+C


# chkconfig --list smb
smb             0:off   1:off   2:off   3:off    4:off   5:off    6:off

# chkconfig --level 35 smb on

# chkconfig --list smb
smb             0:off   1:off   2:off   3:on    4:off   5:on    6:off

# service smb status
smbd is stopped
nmbd is stopped

# service smb start
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

# service smb status
smbd (pid 4584 4583) is running...
nmbd (pid 4586) is running...

$ smbclient -L scoobay
Password: 
Domain=[SCOOBAY] OS=[Unix] Server=[Samba 3.0.14a-2]

        Sharename       Type      Comment
        ---------       ----      -------
        share           Disk      Data Programs Etc
        media           Disk      Music Video Etc
        IPC$            IPC       IPC Service (Scoobay Samba Server)
        ADMIN$          IPC       IPC Service (Scoobay Samba Server)
        nigelp          Disk      Home Directories
Domain=[SCOOBAY] OS=[Unix] Server=[Samba 3.0.14a-2]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        WGHOME1              

$ smbclient //scoobay/share
Password: 
Domain=[SCOOBAY] OS=[Unix] Server=[Samba 3.0.14a-2]
smb: \> ls
  .                                   D        0  Tue Nov 15 10:29:31 2005
  ..                                  D        0  Tue Nov 15 10:29:31 2005

                54400 blocks of size 2097152. 47825 blocks available
smb: \> 

To add - Connecting to the share from windows.

 
sambafs.txt · Last modified: 2005/11/15 08:29 by trinisan
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki