FINAL PROJECT SAMBA Server

26
FINAL PROJECT FINAL PROJECT SAMBA Server SAMBA Server Team: Team: Denise Hughes Denise Hughes & & Erik Kridakara Erik Kridakara Class: IT 298 – Linux Installation Class: IT 298 – Linux Installation Instructor: D.C. Shoemaker Instructor: D.C. Shoemaker

description

FINAL PROJECT SAMBA Server. Team: Denise Hughes & Erik Kridakara Class: IT 298 – Linux Installation Instructor: 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 - PowerPoint PPT Presentation

Transcript of FINAL PROJECT SAMBA Server

Page 1: FINAL PROJECT  SAMBA Server

FINAL PROJECT FINAL PROJECT SAMBA ServerSAMBA Server

Team: Team: Denise HughesDenise Hughes & & Erik KridakaraErik KridakaraClass: IT 298 – Linux InstallationClass: IT 298 – Linux Installation

Instructor: D.C. ShoemakerInstructor: D.C. Shoemaker

Page 2: FINAL PROJECT  SAMBA Server

ContentsContents

1. What Is Samba?1. What Is Samba? 2. The Benefits of Samba2. The Benefits of Samba 3. Where did it come from?3. Where did it come from? 4. Samba Daemons4. Samba Daemons 5. Samba Commands5. Samba Commands 6. Installing Samba6. Installing Samba 7. Configuring Samba 7. Configuring Samba 8. Starting Samba8. Starting Samba 9. Linux Views9. Linux Views10. Windows Views10. Windows Views11. Conclusion11. Conclusion

Page 3: FINAL PROJECT  SAMBA Server

What is Samba?What is Samba?

Samba is a suite of Unix applications that speak Samba is a suite of Unix applications that speak the SMB (Server Message Block) protocol. Many the SMB (Server Message Block) protocol. Many operating systems, including Windows and OS/2, operating systems, including Windows and OS/2, use SMB to perform client-server networking. By use SMB to perform client-server networking. By supporting this protocol, Samba allows Unix supporting this protocol, Samba allows Unix servers to communicate with the same servers to communicate with the same networking protocol as Microsoft Windows networking protocol as Microsoft Windows products.products.

Page 4: FINAL PROJECT  SAMBA Server

The Benefits of SambaThe Benefits of Samba

A Samba-enabled Unix machine can masquerade A Samba-enabled Unix machine can masquerade as a server on your Microsoft network and offer the as a server on your Microsoft network and offer the following services:following services:

Share one or more file systemsShare one or more file systems Share printers installed on both the server and its Share printers installed on both the server and its

clientsclients Assist clients with Network Neighborhood browsingAssist clients with Network Neighborhood browsing Authenticate clients logging onto a Windows domainAuthenticate clients logging onto a Windows domain Provide or assist with WINS name server resolutionProvide or assist with WINS name server resolution Samba is freely available, unlike other SMB/CIFS Samba is freely available, unlike other SMB/CIFS

implementations, and allows for interoperability implementations, and allows for interoperability between Linux/Unix servers and Windows-based between Linux/Unix servers and Windows-based clients.clients.

Page 5: FINAL PROJECT  SAMBA Server

Where did it come from?Where did it come from?

Samba is the creation of Andrew Tridgell, who currently Samba is the creation of Andrew Tridgell, who currently heads the Samba development team from his home in heads the Samba development team from his home in Canberra, Australia. The project began 1991 when Andrew Canberra, Australia. The project began 1991 when Andrew created a fileserver program for his local network that created a fileserver program for his local network that supported an odd DEC protocol from Digital Pathworks that supported an odd DEC protocol from Digital Pathworks that later turned out to be SMB. After a few years, he began later turned out to be SMB. After a few years, he began distributing his custom-made SMB server as a product on distributing his custom-made SMB server as a product on the Internet under the name SMB Server. However, since the Internet under the name SMB Server. However, since that name already belonged to another company's product, that name already belonged to another company's product, he tried the following Unix renaming approach:he tried the following Unix renaming approach:

grep -i 's.*m.*b' /usr/dict/words And the response was:grep -i 's.*m.*b' /usr/dict/words And the response was:

salmonberry samba sawtimber scramble Thus, the name "Samba" salmonberry samba sawtimber scramble Thus, the name "Samba" was born.was born.

Page 6: FINAL PROJECT  SAMBA Server

SAMBA DaemonsSAMBA Daemons Samba actually contains several programs that serve Samba actually contains several programs that serve

different but related purposes. The majority of the different but related purposes. The majority of the programs that come with the Samba distribution center rely programs that come with the Samba distribution center rely on its two daemons. on its two daemons.

smbdsmbdThe The smbdsmbd daemon is responsible for managing the shared resources daemon is responsible for managing the shared resources between the Samba server machine and its clients. It provides file, print, between the Samba server machine and its clients. It provides file, print, and browser services to SMB clients across one or more networks. and browser services to SMB clients across one or more networks. smdbsmdb handles all notifications between the Samba server and the network handles all notifications between the Samba server and the network clients. In addition, it is responsible for user authentication, resource clients. In addition, it is responsible for user authentication, resource locking, and data sharing through the SMB protocol.locking, and data sharing through the SMB protocol.

nmbdnmbdThe The nmbdnmbd daemon is a simple nameserver that mimics the WINS and daemon is a simple nameserver that mimics the WINS and NetBIOS name server functionality. This daemon listens for nameserver NetBIOS name server functionality. This daemon listens for nameserver requests and provides the appropriate information when called upon. It requests and provides the appropriate information when called upon. It also provides browse lists for the Network Neighborhood and participates in also provides browse lists for the Network Neighborhood and participates in browsing elections.browsing elections.

Page 7: FINAL PROJECT  SAMBA Server

SAMBA CommandsSAMBA CommandsSamba comes with a small set of Unix command-line tools:Samba comes with a small set of Unix command-line tools:

smbclientsmbclientAn FTP-like Unix client that can be used to connect to Samba sharesAn FTP-like Unix client that can be used to connect to Samba shares

smbtarsmbtarA program for backing up data in shares, similar to the Unix A program for backing up data in shares, similar to the Unix tartar command command

nmblookupnmblookupA program that provides NetBIOS over TCP/IP name lookupsA program that provides NetBIOS over TCP/IP name lookups

smbpasswdsmbpasswdA program that allows an administrator to change the encrypted passwords used by SambaA program that allows an administrator to change the encrypted passwords used by Samba

smbstatussmbstatusA program for reporting the current network connections to the shares on a Samba serverA program for reporting the current network connections to the shares on a Samba server

testparmtestparmA simple program to validate the Samba configuration fileA simple program to validate the Samba configuration file

testprnstestprnsA program that tests whether various printers are recognized by the A program that tests whether various printers are recognized by the smbdsmbd daemon daemon

Page 8: FINAL PROJECT  SAMBA Server

Installing SambaInstalling Samba

Binary packages of Samba are included in Binary packages of Samba are included in almost any Linux or UNIX distribution. almost any Linux or UNIX distribution. There are also some packages available at There are also some packages available at the main Samba site at the main Samba site at www.samba.orgwww.samba.org

Page 9: FINAL PROJECT  SAMBA Server

Installing: Our systemInstalling: Our system

We chose Slackware based distro called We chose Slackware based distro called Vector LinuxVector Linux

VECTORLINUXVECTORLINUX is a small, fast, Linux operating is a small, fast, Linux operating system for Intel, AMD and x86 compatible systems, system for Intel, AMD and x86 compatible systems, based on one of the original Linux distributions, based on one of the original Linux distributions, Slackware. It's popularity stems from the fact that it Slackware. It's popularity stems from the fact that it is a robust, versatile and almost unbreakable system. is a robust, versatile and almost unbreakable system. Due to the small size and memory requirements of Due to the small size and memory requirements of the operating system it can be deployed on older the operating system it can be deployed on older machines that may otherwise have been long machines that may otherwise have been long forgotten.forgotten.

Page 10: FINAL PROJECT  SAMBA Server

Installing Samba (Continued)Installing Samba (Continued)

Step by step:Step by step:1. Download the source or binary files.1. Download the source or binary files.

2. Configure a makefile.2. Configure a makefile.

3. Compile the server code.3. Compile the server code.

4. Install the server files.4. Install the server files.

5. Create a Samba configuration file.5. Create a Samba configuration file.

6. Test the configuration file.6. Test the configuration file.

7. Start the Samba daemons.7. Start the Samba daemons.

8. Test the Samba daemons.8. Test the Samba daemons.

Page 11: FINAL PROJECT  SAMBA Server

Samba ConfigurationSamba ConfigurationThe key to configuring Samba is its lone configuration file: smb.conf.The key to configuring Samba is its lone configuration file: smb.conf.

# Denise & Erik’s Samba configuration file.# Denise & Erik’s Samba configuration file.

#=========== Global Settings ===============#=========== Global Settings ===============[global][global]

workgroup = linux workgroupworkgroup = linux workgroupserver string = Samba Serverserver string = Samba Serverhosts allow = 192.168.1. 192.168.2.127.hosts allow = 192.168.1. 192.168.2.127.log file = /var/log/samba.%mlog file = /var/log/samba.%mmax log size = 50max log size = 50dns proxy = nodns proxy = no

printing = cupsprinting = cups

restrict anonymous = norestrict anonymous = nodomain master = nodomain master = nopreferred master = nopreferred master = nomax protocol = NTmax protocol = NTldap ssl = Noldap ssl = Noserver signing = Autoserver signing = Autolanman auth = nolanman auth = noclient plaintext auth = noclient plaintext auth = noclient lanman auth = noclient lanman auth = nontlm auth = nontlm auth = noclient use spnego = noclient use spnego = noencrypt passwords = noencrypt passwords = nouse spnego = nouse spnego = nosecurity = sharesecurity = share

Page 12: FINAL PROJECT  SAMBA Server

#================== Share Definitions ===============#================== Share Definitions ===============[home][home]comment = Home Directoriescomment = Home Directoriesread only = noread only = no

[printers][printers]comment = All Printerscomment = All Printerspath = /var/spool/sambapath = /var/spool/sambabrowseable = nobrowseable = noprintable = yesprintable = yes

[tmp][tmp]comment = Temporary file spacecomment = Temporary file spacepath = /tmppath = /tmpread only = noread only = noguest ok = yesguest ok = yes

# A publicly accessible directory, but read only, except for people in# A publicly accessible directory, but read only, except for people in# the "slackers" group# the "slackers" group

[slackers][slackers]comment = Public Stuffcomment = Public Stuffpath = /home/slackerspath = /home/slackersguest ok = yesguest ok = yesread only = noread only = nowrite list = @slackerswrite list = @slackers

Page 13: FINAL PROJECT  SAMBA Server

# Two private directories# Two private directories

[erik][erik]comment = Erik's Servicecomment = Erik's Servicepath = /usr/somewhere/privatepath = /usr/somewhere/privatevalid users = erikvalid users = erikread only = noread only = no

[denise][denise]comment = Denise's home foldercomment = Denise's home folderpath = home/denisepath = home/denisevalid users = denisevalid users = denise# A public directory, read/write to all users.# A public directory, read/write to all users.

[public][public]path = /usr/somewhere/publicpath = /usr/somewhere/publicguest ok = yesguest ok = yesguest only = yesguest only = yesread only = noread only = no

# Three user directories# Three user directories

[shared][shared]comment = denise & erik & pookiecomment = denise & erik & pookiepath = /usr/somewhere/sharedpath = /usr/somewhere/sharedvalid users = pookie erik denisevalid users = pookie erik deniseread only = noread only = nocreate mask = 0765create mask = 0765

# End of file# End of file

Page 14: FINAL PROJECT  SAMBA Server

Starting SambaStarting SambaStarting the Samba DaemonsStarting the Samba Daemons

There are two Samba processes, There are two Samba processes, smbdsmbd and and nmbdnmbd, that , that need to be running for Samba to work correctly. need to be running for Samba to work correctly.

There are typically three ways to start Samba:There are typically three ways to start Samba:

• By handBy hand

• As stand-alone daemons (how we did it)As stand-alone daemons (how we did it)

• From From inetd inetd

Page 15: FINAL PROJECT  SAMBA Server

Starting the Daemons by HandStarting the Daemons by Hand

You can start the Samba daemons by hand. As root, You can start the Samba daemons by hand. As root, simply enter the following commands:simply enter the following commands:

## /usr/local/samba/bin/smbd –D /usr/local/samba/bin/smbd –D## /usr/local/samba/bin/nmbd –D /usr/local/samba/bin/nmbd –D

At this point, Samba will be running on your system and will be At this point, Samba will be running on your system and will be ready to accept connections.ready to accept connections.

Page 16: FINAL PROJECT  SAMBA Server

Starting From InetdStarting From Inetd

The The inetdinetd daemon is a Unix system's Internet "super daemon." daemon is a Unix system's Internet "super daemon." It listens on TCP ports defined in It listens on TCP ports defined in /etc/services/etc/services and executes and executes the appropriate program for each port, which is defined in the appropriate program for each port, which is defined in /etc/inetd.conf/etc/inetd.conf. .

The advantage is that you can have a large number of The advantage is that you can have a large number of daemons ready to answer queries, but they don't all have to daemons ready to answer queries, but they don't all have to be running. Instead, the be running. Instead, the inetdinetd daemon listens in place of all daemon listens in place of all the others. This is handy if you have only one or two users or 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 your machine has too many daemons already. It's also easier to perform an upgrade without disturbing an existing to perform an upgrade without disturbing an existing connection.connection.

The disadvantage is a small overhead cost of creating a new The disadvantage is a small overhead cost of creating a new daemon process, and that you need to edit two files rather daemon process, and that you need to edit two files rather than one to set things up. than one to set things up.

Page 17: FINAL PROJECT  SAMBA Server

Stand-alone DaemonsStand-alone Daemons

To run the Samba processes as stand-alone To run the Samba processes as stand-alone daemons, you need to add the commands daemons, you need to add the commands listed in the previous section to your standard listed in the previous section to your standard Unix startup scripts. Unix startup scripts.

## /usr/local/samba/bin/smbd –D /usr/local/samba/bin/smbd –D## /usr/local/samba/bin/nmbd –D /usr/local/samba/bin/nmbd –D

How this is done varies depending on type of How this is done varies depending on type of Unix system you have. Unix system you have.

Page 18: FINAL PROJECT  SAMBA Server

Where our script gets called fromWhere our script gets called from

Page 19: FINAL PROJECT  SAMBA Server

Check that its runningCheck that its running

Page 20: FINAL PROJECT  SAMBA Server

Linux view of sharesLinux view of shares

Page 21: FINAL PROJECT  SAMBA Server

Windows View – Browsing the NetworkWindows View – Browsing the Network

Page 22: FINAL PROJECT  SAMBA Server

Windows – Viewing Samba SharesWindows – Viewing Samba Shares

Page 23: FINAL PROJECT  SAMBA Server

Windows – View of a mapped shareWindows – View of a mapped share

Page 24: FINAL PROJECT  SAMBA Server

Finding the printer in WindowsFinding the printer in Windows

Page 25: FINAL PROJECT  SAMBA Server

Printing from WindowsPrinting from Windows

Page 26: FINAL PROJECT  SAMBA Server

ConclusionConclusion

Although Samba is initially somewhat Although Samba is initially somewhat difficult to install and configure manually, difficult to install and configure manually, it is a great way to use Linux as an it is a great way to use Linux as an inexpensive file and print server. It’s also inexpensive file and print server. It’s also a great learning experience!a great learning experience!

Samba can also be used as a Windows Samba can also be used as a Windows domain controller – Next Project!!!domain controller – Next Project!!!