260 likes | 270 Views
Explore the world of Samba - a Unix application suite facilitating seamless communication with Windows networks. From benefits to configuration and installation steps, uncover the power of Samba in bridging Linux and Windows environments effectively. Dive deep into Samba daemons, commands, and configuration settings for a successful integration experience. Learn key concepts with Linux and Windows views, and conclude with a solid understanding of network sharing through Samba.
E N D
FINAL PROJECT SAMBA Server Team: Denise Hughes & Erik KridakaraClass: IT 298 – Linux InstallationInstructor: D.C. Shoemaker
Contents 1. What Is Samba? 2. The Benefits of Samba 3. Where did it come from? 4. Samba Daemons 5. Samba Commands 6. Installing Samba 7. Configuring Samba 8. Starting Samba 9. Linux Views 10. Windows Views 11. Conclusion
What is Samba? Samba is a suite of Unix applications that speak the SMB (Server Message Block) protocol. Many operating systems, including Windows and OS/2, use SMB to perform client-server networking. By supporting this protocol, Samba allows Unix servers to communicate with the same networking protocol as Microsoft Windows products.
The Benefits of Samba A Samba-enabled Unix machine can masquerade as a server on your Microsoft network and offer the following services: • Share one or more file systems • Share printers installed on both the server and its clients • Assist clients with Network Neighborhood browsing • Authenticate clients logging onto a Windows domain • Provide or assist with WINS name server resolution • Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients.
Where did it come from? Samba is the creation of Andrew Tridgell, who currently heads the Samba development team from his home in Canberra, Australia. The project began 1991 when Andrew created a fileserver program for his local network that supported an odd DEC protocol from Digital Pathworks that later turned out to be SMB. After a few years, he began distributing his custom-made SMB server as a product on the Internet under the name SMB Server. However, since that name already belonged to another company's product, he tried the following Unix renaming approach: • grep -i 's.*m.*b' /usr/dict/words And the response was: • salmonberry samba sawtimber scramble Thus, the name "Samba" was born.
SAMBA Daemons Samba actually contains several programs that serve different but related purposes. The majority of the programs that come with the Samba distribution center rely on its two daemons. smbd The smbd daemon is responsible for managing the shared resources between the Samba server machine and its clients. It provides file, print, and browser services to SMB clients across one or more networks. smdb handles all notifications between the Samba server and the network clients. In addition, it is responsible for user authentication, resource locking, and data sharing through the SMB protocol. nmbd The nmbd daemon is a simple nameserver that mimics the WINS and NetBIOS name server functionality. This daemon listens for nameserver requests and provides the appropriate information when called upon. It also provides browse lists for the Network Neighborhood and participates in browsing elections.
SAMBA Commands Samba comes with a small set of Unix command-line tools: smbclient An FTP-like Unix client that can be used to connect to Samba shares smbtar A program for backing up data in shares, similar to the Unix tar command nmblookup A program that provides NetBIOS over TCP/IP name lookups smbpasswd A program that allows an administrator to change the encrypted passwords used by Samba smbstatus A program for reporting the current network connections to the shares on a Samba server testparm A simple program to validate the Samba configuration file testprns A program that tests whether various printers are recognized by the smbd daemon
Installing Samba Binary packages of Samba are included in almost any Linux or UNIX distribution. There are also some packages available at the main Samba site at www.samba.org
Installing: Our system We chose Slackware based distro called Vector Linux VECTORLINUX is a small, fast, Linux operating system for Intel, AMD and x86 compatible systems, based on one of the original Linux distributions, Slackware. It's popularity stems from the fact that it is a robust, versatile and almost unbreakable system. Due to the small size and memory requirements of the operating system it can be deployed on older machines that may otherwise have been long forgotten.
Installing Samba (Continued) Step by step: 1. Download the source or binary files. 2. Configure a makefile. 3. Compile the server code. 4. Install the server files. 5. Create a Samba configuration file. 6. Test the configuration file. 7. Start the Samba daemons. 8. Test the Samba daemons.
Samba Configuration The key to configuring Samba is its lone configuration file: smb.conf. # Denise & Erik’s Samba configuration file. #=========== Global Settings =============== [global] workgroup = linux workgroup server string = Samba Server hosts allow = 192.168.1. 192.168.2.127. log file = /var/log/samba.%m max log size = 50 dns proxy = no printing = cups restrict anonymous = no domain master = no preferred master = no max protocol = NT ldap ssl = No server signing = Auto lanman auth = no client plaintext auth = no client lanman auth = no ntlm auth = no client use spnego = no encrypt passwords = no use spnego = no security = share
#================== Share Definitions =============== [home] comment = Home Directories read only = no [printers] comment = All Printers path = /var/spool/samba browseable = no printable = yes [tmp] comment = Temporary file space path = /tmp read only = no guest ok = yes # A publicly accessible directory, but read only, except for people in # the "slackers" group [slackers] comment = Public Stuff path = /home/slackers guest ok = yes read only = no write list = @slackers
# Two private directories [erik] comment = Erik's Service path = /usr/somewhere/private valid users = erik read only = no [denise] comment = Denise's home folder path = home/denise valid users = denise # A public directory, read/write to all users. [public] path = /usr/somewhere/public guest ok = yes guest only = yes read only = no # Three user directories [shared] comment = denise & erik & pookie path = /usr/somewhere/shared valid users = pookie erik denise read only = no create mask = 0765 # End of file
Starting Samba Starting the Samba Daemons There are two Samba processes, smbd and nmbd, that need to be running for Samba to work correctly. There are typically three ways to start Samba: • By hand • As stand-alone daemons (how we did it) • From inetd
Starting the Daemons by Hand You can start the Samba daemons by hand. As root, simply enter the following commands: # /usr/local/samba/bin/smbd –D # /usr/local/samba/bin/nmbd –D At this point, Samba will be running on your system and will be ready to accept connections.
Starting From Inetd The inetd daemon is a Unix system's Internet "super daemon." It listens on TCP ports defined in /etc/services and executes the appropriate program for each port, which is defined in /etc/inetd.conf. The advantage is that you can have a large number of daemons ready to answer queries, but they don't all have to be running. Instead, the inetd daemon listens in place of all the others. This is handy if you have only one or two users or your machine has too many daemons already. It's also easier to perform an upgrade without disturbing an existing connection. The disadvantage is a small overhead cost of creating a new daemon process, and that you need to edit two files rather than one to set things up.
Stand-alone Daemons • To run the Samba processes as stand-alone daemons, you need to add the commands listed in the previous section to your standard Unix startup scripts. • # /usr/local/samba/bin/smbd –D • # /usr/local/samba/bin/nmbd –D • How this is done varies depending on type of Unix system you have.
Conclusion • Although Samba is initially somewhat difficult to install and configure manually, it is a great way to use Linux as an inexpensive file and print server. It’s also a great learning experience! • Samba can also be used as a Windows domain controller – Next Project!!!