Difference between revisions of "User:Axanon/trashcan"

From ArchWiki
Jump to: navigation, search
(Created page with "<!-- commented for editing purposes Category:Networking cs:Samba de:Samba da:Samba es:Samba fr:Samba it:Samba ru:Samba sr:Samba [[tr:Samba]...")
(Blanked the page)
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- commented for editing purposes
{{Article summary start|Summary}}
{{Article summary text|Installing, configuring and troubleshooting Samba}}
{{Article summary heading|Related}}
{{Article summary wiki|NFS}}
{{Article summary wiki|Samba Domain Controller}}
{{Article summary end}}
'''Samba''' is a re-implementation of the SMB/CIFS networking protocol, it facilitates file and printer sharing among Linux and Windows systems as an alternative to [[NFS]].  Some users say that Samba is easily configured and that operation is very straight-forward.  However, many new users run into problems with its complexity and non-intuitive mechanism.  It is strongly suggested that the user stick close to the following directions.
==Required Packages==
To share files with Samba, install {{Pkg|samba}}, from the [[Official Repositories]].
Only {{Pkg|smbclient}} is required to access files from a Samba/SMB/CIFS server. It is also available from the Official Repositories.
==Server Configuration==
The {{ic|/etc/samba/smb.conf}} file must be created before starting the daemons. Once that is set up, users may opt for using an advanced configuration interface like SWAT.
As root, copy the default Samba configuration file to {{ic|/etc/samba/smb.conf}}:
{{bc|# cp /etc/samba/smb.conf.default /etc/samba/smb.conf}}
===Creating a Share===
Edit {{ic|smb.conf}}. Scroll down to the '''Share Definitions''' section. The default configuration automatically creates a share for each user's home directory. It also creates a share for printers.
There are a number of commented sample configurations included. More information about the available options can be found in {{ic|man smb.conf}}. [http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html Here] is the on-line version.
===Adding a User===
To log into a Samba share, a samba user is needed. The user '''must''' already have a [[Users and Groups|Linux user account]] with the same name on the server, otherwise running the next command will fail:
# pdbedit -a -u <user>
{{Note|As of version 3.4.0, smbpasswd is no longer used by default. Existing smbpasswd databases can be [[Samba#Changes in Samba version 3.4.0|converted to the new format]]}}
== Web-based Configuration==
'''SWAT''' (Samba Web Administration Tool) is a facility that is part of the Samba suite. Whether or not to use this tool remains a matter of personal preference. It does allow for quick configuration and has context-sensitive help for each {{ic|smb.conf}} parameter. SWAT also provides an interface for monitoring of current state of connection(s), and  allows network-wide MS Windows network password management.
{{Warning|Before using SWAT, be warned that SWAT will completely replace {{ic|/etc/samba/smb.conf}} with a fully optimized file that has been stripped of all comments, and only non-default settings will be written to the file.}}
To use SWAT, first install {{Pkg|xinetd}}, available in the [[Official Repositories]].
Edit {{ic|/etc/xinetd.d/swat}}. To enable SWAT, change the {{ic|1=disable = yes}} line to {{ic|1=disable = no}}.
service swat
        type                    = UNLISTED
        protocol                = tcp
        port                    = 901
        socket_type            = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/swat
        log_on_success          += HOST DURATION
        log_on_failure          += HOST
        disable                = no
Alternatively, add an entry for swat to {{ic|/etc/services}} and omit the first 3 lines of the configuration.
Then start/enable the xinetd [[daemon]].
The web interface can be accessed on port 901 by default:
{{Note|An all-encompasing [[Webmin]] tool is also available, and the SWAT module can be loaded there.}}

Latest revision as of 19:01, 30 January 2013