Difference between revisions of "Samba"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎How To: ...get DNS to recognize NetBIOS names)
(extracted stuff to subpages; some tidying & updates)
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Computing]]: [[Linux]]: [[Samba]]
+
<hide>
 +
[[page type::article]]
 +
[[thing type::software]]
 +
[[software type::server]]
 +
[[category:software]]
 +
</hide>
 +
==About==
 +
[[Samba]] is open-source server software which allows "[[Network Neighborhood]]"-style communication between [[Microsoft Windows]] and other [[operating system]]s such as [[Linux]]. It is named after the [[SMB protocol]], which is what Windows uses for "Network Neighborhood" communication.
 +
==Pages==
 +
* {{l/sub|browser}}: debugging master/domain browser issues
 +
* {{l/sub|commands}} for interacting with Samba
 +
* {{l/sub|how-to}}
 +
* {{l/sub|printing}}: using Samba to serve shared printers
 +
* '''files'''
 +
** [[smb.conf]]: the Samba configuration file
 +
** [[smbusers]]: the Samba users file
 +
==Notes==
 +
''as explained by user adaptr on #samba on freenode:''
  
[[Samba]] is a program which allows "Network Neighborhood"-style communication between Linux and Windows. It is named after the SMB protocol, which is what Windows uses for "Network Neighborhood" communication.
+
Each machine that participates in a netbios/smb network (or workgroup) is both client and server - it takes services and advertises them. Any machine at least advertises the <u>MACHINE</u> service &ndash; just its own netbios machine name with a specific SMB service type &ndash; so even if it's only trying to browse or auth to an SMB server, that client offers its own service data to what is known as the [[SMB/master browser|master browser]].
==How To==
 
===Restart the Samba Server===
 
If you have Fedora Core, there's a convenient little "services" application you can use to restart Samba and several dozen other services. For the rest of us, however, there's a command you have to execute from a root terminal.
 
  
On [[Ubuntu]], and probably other [[Debian]]-based systems:
+
''user kukks adds:''
/etc/init.d/samba restart
 
  
On [[Red Hat Linux|Red Hat]], I'm told the command would be:
+
To get more debug info from the cifs kernel module, use the following as root:
  /sbin/samba restart
+
echo 7 > /proc/fs/cifs/cifsFYI
 +
This will instruct cifs vfs to write more debug stuff to the kernel log.
 +
===can't browse into folders===
 +
The following lines in [[smb.conf]] fix a common problem where you can see folders underneath a share but can't browse into them (this may only be a problem if they are symbolic links):
 +
  # 2010-04-20 makes wide links work again
 +
  # allows samba to show/include symbolic-linked folders and files:
 +
  follow symlinks = yes
 +
  # allows links to targets not within the shared folder
 +
  wide links = yes
 +
  # disable option incompatible with wide links
 +
  unix extensions  = no
  
(Possibly substituting "smb" for "samba"; ls the directory in question to find a list of services.) This is the same general technique used for restarting services, which should itself probably be documented somewhere. (The Samba share configuration GUI program really ought to have a "restart Samba server" button, though, even if it does this automatically when you change parameters -- because there is no way to know if it is doing this otherwise.)
+
==How To==
===Get DNS to Recognize NetBIOS Names===
 
I haven't actually figured this one out yet; I've seen several workable solutions, but they all seem hideously complicated. This shouldn't be a difficult problem.
 
 
 
One possible phrasing of the problem, for purists: How can we add {NetBIOS's knowledge of machine names on the network} to the available domain space? This is needed so that commands which accept a domain name as input (e.g. ftp, ssh, mysql) can accept a machine name instead, removing the necessity to manually look up the machine's IP address.
 
 
 
One useful bit of information: the command [[nmblookup]] will accept a NetBIOS name and return an IP address.
 
 
 
==Reference==
 
*[[Wikipedia:Samba software]]
 
*[[Wikipedia:Server Message Block]]: SMB protocol
 
 
==Links==
 
==Links==
* [http://searchopensource.techtarget.com/tip/1,289483,sid39_gci1138772,00.html Managing Samba: Choose your weapon -- Windows network ID basics]: seems to cover some useful concepts
+
===Official===
 +
* [http://samba.org official site]
 +
===Reference===
 +
* [[Wikipedia:Samba software]]
 +
* [[Wikipedia:Server Message Block]]: SMB protocol
 +
===Articles===
 +
* '''1999-11''' [http://www.oreilly.com/catalog/samba/chapter/book/ch03_01.html Chapter 3: Configuring Windows Clients] from the book ''Using Samba'' by Robert Eckstein, David Collier-Brown, Peter Kelly (this shows how to set up [[Win9x]] machines for non-anonymous connection to Samba)
 +
* [http://searchopensource.techtarget.com/tip/1,289483,sid39_gci1138772,00.html Managing Samba: Choose your weapon &ndash; Windows network ID basics]: seems to cover some useful concepts

Latest revision as of 18:54, 25 June 2018

About

Samba is open-source server software which allows "Network Neighborhood"-style communication between Microsoft Windows and other operating systems such as Linux. It is named after the SMB protocol, which is what Windows uses for "Network Neighborhood" communication.

Pages

Notes

as explained by user adaptr on #samba on freenode:

Each machine that participates in a netbios/smb network (or workgroup) is both client and server - it takes services and advertises them. Any machine at least advertises the MACHINE service – just its own netbios machine name with a specific SMB service type – so even if it's only trying to browse or auth to an SMB server, that client offers its own service data to what is known as the master browser.

user kukks adds:

To get more debug info from the cifs kernel module, use the following as root:

echo 7 > /proc/fs/cifs/cifsFYI

This will instruct cifs vfs to write more debug stuff to the kernel log.

can't browse into folders

The following lines in smb.conf fix a common problem where you can see folders underneath a share but can't browse into them (this may only be a problem if they are symbolic links):

# 2010-04-20 makes wide links work again
 # allows samba to show/include symbolic-linked folders and files:
 follow symlinks = yes
 # allows links to targets not within the shared folder
 wide links = yes
 # disable option incompatible with wide links
 unix extensions  = no

How To

Links

Official

Reference

Articles