- smbd - authorizes client access to shares and provides shared access to files and folders.
- nmbd - provides browsing facility that let client to search server and their shares.Also act like a WINS server resolving NetBIOS host names
print tool utility lets us to configure access to Samba printers.
Samba is contain in 3 packages
- samba-common, which contains files needed by samba clients and servers.
- samba,which contains the samba server.
- samba-client,which contains the samba smbclient,smbmount and smbprint.
$ smbd -V
Version 3.0.10-1.4E.2
On Red Hat Linux, I use the rpm command to query the installed packages for Samba:
$ rpm -qa | grep samba
samba-client-3.0.10-1.4E.2
samba-3.0.10-1.4E.2
samba-common-3.0.10-1.4E.2
Administration
the main server administratrion script for samba is /etc/init.d/smb.By invoking this with proper arguments we can control the samba server.
to start samba server:
/etc/init.d/smb start or
service smb start
to restart the samba server:
/etc/init.d/smb restart or
service smb restart
to stop samba server:
/etc/init.d/smb stop or
service smb stop
to check samba status:
/etc/init.d/smb status
Basic server configuration
The main Samba configuration file is /etc/smb.conf, which contains two types of directives:
- Global directives, which configure the server.
- Service directives, which configure shared files and printers.
The host allow directive identifies the client host permitted to access the server.The localhost address 127.0.0.1,should generally be included in the list of hosts.
#specify the hosts that can access the server
host allow = 192.168.1 192.168.2 127. (partial IP addresses note the trailing dot)
For Windows 9x and NT clients,I specify user as the value of the security parameter.For handling authorization on a per-share basis,value can be specified as share.To handle authorization by primary domain controller(PDC) in another server security value must be specified as server.If the client participate in a domain,value should be domain.
#specify the security is imposed at the user level
security = server
Samba service directives
To create a publicly available share,omit the valid user directive and specify public = yes.
To create access to all members of the group,specify public = @group_name.
To avoid to be in a browse list,specify browseable = no.
Client configuration and use
To access a samba share or a windows 9x/NT share from a linux host:
smbmount //server/share /mount_point
To access a share using smbclient //server/share
Troubleshooting
Testparm tests my configuration file(smb.conf) and report any unknown parameters or incorrect syntax. It also performs a check for common misconfiguration and will issue a warning if one is found.
testparm /etc/samba/smb.conf
To list available shares on the server:
smbclient -L localhost -N
If no shares are visible,the WINS server may not be responding,to investigate that:
nmblookup -B localhost __SAMBA__
to check whether SMB clients are properly configured to use WINS:
nmblookup -d 2 '*'
No comments:
Post a Comment