Samba is a suite of applications and daemon processes used on Unix-Like machines primarily for communicating with windows machines for sharing filespace and printers.
Samba is based upon SMB (Server Message Block) protocol which describes rules for communication among various machines on a network(for sharing filespace and printers).
Samba's flexibility and functionality are unmatched.
Apart from sharing file space and printers, it offers some more services like:
1. It can act as a Local Browse Master for a Workgroup. Supports domain logon and logon scripts. Supports browsing on other subnetsand also supports replication of Browse list across subnet boundaries.
2. It supports a 'Shared User Database' with all the servers in adomain sharing a distributed NIS or kerberos authentication database.
3. It can act as a WINS server.
4. It supports SMB password encryption scheme.
5. It can be turned into a Fax Server.
6. It can take backup of PCs directly to a tape.
Sharing filespace and printers using Samba. This can be branched into sharing your filespace and printers with others and sharing others filespace and printers with yours.
Sharing your filespace and printers with others:
This is accomplished in terms of services (shares in windows). The concept is simply that your machine offers services to other machines when it lets them read from/write to your drive or when it lets others print on your printer. Services are created by configuring/etc/smb.conf (In fact, smb.conf is the backbone of Samba Suite). Samba offers so much flexibility in making the services that it can bereal fun for a creative mind. This is accomplished by the followingcomponents of Samba suite....
smbdsmbd
is a daemon process that plays key role in providingservices. It listens to the service requests from other machines and responds as specified in /etc/smb.conf (got the importance of this file? ;-)
nmbd
is a daemon process that understands and replies tonetbios name service requests. Whenever its own name (themachine it's running on) is specified, it responds with the IPaddress of the machine it's running on.
smb.conf
This is the configuration file for Samba. All daemon processesof Samba suite read this file which makes it extremely important. I advise you to go through man pages and how-to before you sit down to edit this file. If you don't feel like doing it, I have made an attempt of writing a generic file that should satisfy your needs. You can use it but the condition is that you will have to tell me how bad it is so that others find it a little less bad.
testparm
Once smb.conf is edited to meet your requirements, you have to check it's validity. Here test parm comes for your rescue. It can point out most of the blunders that your smb.conf is likely to cause test prns .
This one points out printing related blunders.
Sharing others filespace and printers:
This is accomplished by a host of commands...
smbclient
smbclient lets you inquire about the services a machine offers.All you have to do is smbclient -L hostname and it lists allthe services of hostname. If you want to browse through aservice, just do smbclient \hostservice. It will give youan ftp like interface.
smbmount
Call it mapping hostservice on drive U:!! You need to accesssome services quite frequently. smbclient is good for quickbrowsing but not feasible in such a case. So, here comessmbmount. It lets you mount hostservice on a directory justthe way you mount any filesystem. Just do smbmount//host/service /path_to_mount_point and it's done. Access thefiles/printers just as they are attached to your machine!
smbumount Well, it's obvious!! You may want to unmount the filesy stem once you are through with your job.
To umount:
smbumount/path_to_mount_point and ....
nmblookup :It finds the IP Address of a machine given it's netbios name(the name by which a machine appears in Network Neighborhood).
LinNeighborhood application: It up. It's a do-all application witha nice GUI for Samba. A pretty good substitute of the abovefour commands if you find command line a little messy!!
No comments:
Post a Comment