1 / 18

SAMBA

SAMBA. Integrating Linux and Window. What is Samba?. Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2 and Windows, as both a server and a client As a server, Samba shares Linux files and printers with Windows systems.

fordon
Download Presentation

SAMBA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAMBA Integrating Linux and Window

  2. What is Samba? • Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2 and Windows, as both a server and a client • As a server, Samba shares Linux files and printers with Windows systems. • As a client, Samba gives Linux users access to files on Windows systems

  3. Shares • Under Samba, an exported directory hierarchy is called a share. • Samba derived from SMB – protocol for file and printer sharing in Windows

  4. Samba Users, User Maps, and Passwords • For a Windows user to gain access to Samba services on a Linux system, the user must provide a Windows username and a Samba password. It is also possible to authenticate using other methods such as LDAP or PAM

  5. Usernames • The supplied username must be the same as a Linux username or must map to a Linux username. • Samba keeps the username maps in/etc/samba/smbusers. • Users with the same username on Windows and Samba do not need to appear in this file, but still need a Samba password • When you install Samba, /etc/samba/smbusers has 2 entries: • root = administrator admin • Nobody = guest pcguest smbguest

  6. Passwords • Samba uses Samba passwords, not Linux passwords to authenticate users. • When you attempt to connect from Windows to a Samba server, Windows presents your Windows username and password to Samba. If your windows username is the same as or maps to your Linux username, and if your Windows and Samba passwords are the same, you do not have to enter a username and password to connect to the Samba server. • Samba keeps passwords in /etc/samba/smbpasswd

  7. To add Samba access for the Win user sam: • vi smbusers sls = sam • # smbpasswd –a sls New SMB password: Retype new SMB password: Added user sls Now when sam uses the username sam to log in to the Samba server, Samba maps sam to sls and looks up sls in smbpasswd. Sam logs on as sls.

  8. Configuring a Samba Server • system-config-samba – can set up only basic features of a Samba server. • Performs 3 functions: • Configuration of server • Configuration of users • Setting up shares that are exported to Windows machines • Overwrites /etc/samba/smb.conf. Make backup copy before running system-config-samba

  9. Configuring samba using system-config-samba • System-config-samba • Set workgroup to workgroup in use on Windows machines. • Make sure authentication is set to user • Set encrypted passwords to Yes • Add Samba users • Add shares

  10. Swat: Configures a Samba server • Samba Web Administration Tool – is a browser-based GUI for the smb.conf file. • Swat is run from /etc/xinetd.d/swat • Turn on by changing disable = yes to disable=no. • Add any remote names or Ips of other systems that will access swat • Chkconfig swat on • Service xinetd restart • To access, enter http://127.0.0.1:901 or http://localhost:901

  11. Manually configuring a Samba server • Edit the /etc/samba/smb.conf • Can set up: • Global parameters • Security parameters • Logging parameters • Browser parameters • Communication parameters • Share parameters

  12. Sharing user’s home directories • Often, users like to share their home directories with a Windows machine. To make this easier, Samba provides the [homes] share. When you define this share, each user’s home directory is shared with the specified parameters. • For example: [homes] comment = Home Directories browseable = no writable = yes This prevents users other than the owners from browsing home directories while allowing logged-in owners full access.

  13. Accessing Windows Shares from Linux • As a client, samba enables you to view and work with files on a Windows system from a Linux system. • smbtree – displays windows shares in a hierarchical tree. When prompted for a password, hit enter to view shares available to guest. Enter password to view restricted shares.

  14. Smbclient: Connects to Windows Shares • Smbclient functions similarly to ftp and connects to a windows share. • $ smbclient //PB/mark connects to a windows share

  15. Mounting Windows Shares • On the Linux computer, you can mount a Windows share so that you can write files to it. • Mount –t cifs //host/sharedir /share –o username=mark, password=pizza • Ls /

  16. Troubleshooting • Samba provides 3 utilities to troubleshoot a connection: • Smbstatus – displays a report on open Samba connections • Testparm – checks the syntax of /etc/samba/smb.conf and displays its contents • Testprns – checks the validity name of a printer

  17. Troubleshooting 1. Restart the smbd and nmbd daemons • Service smb restart • Run testparm to check that the smb.conf is syntactically correct • Ping from both sides of the connection to make sure that the network is up. • From Windows, net view \\servername to display a list of shares available from the server. • Try to map the drive with a net use x: \\pb\tmp

  18. Troubleshooting cont. • Sbclient –L pb List all available shares

More Related