Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:samba

Dies ist eine alte Version des Dokuments!


Samba Setup

Expose one shared dir

Tested setup on Slack 12.2.

First create a simple Samba configuration file /etc/samba/smb.conf:

[global]
    workgroup = testgroup
    follow symlinks = no
[mytest]
    path = /smb
    read only = no
    guest ok = no

Test Your Config File, create a directory for the [mytest] samba share above, start samba server and check if server responds (all as root):

testparm /etc/samba/smb.conf # test config file
mkdir /smb                   # create samba share
chmod 777 /smb
chomd +x /etc/rc.d/rc.samba  # start server
/etc/rc.d/rc.samba start
smbclient -U% -L localhost   # check (just press return at password promt)

Enable access for a normal user (eg „sandy“). Note that the user must already have a normal login on the machine (adduser sandy).

smbpasswd -a sandy

Check if samba share is accessable as normal user sandy on the server:

smbclient //localhost/mytest

Check if samba share is accessable as normal user sandy on a windows client:

M:\>net use j: \\etb-111\mytest

Other documentation: Using Samba, 2nd Edition, Samba-3 by Example, Samba man pages

Expose home dirs per user

[global]
    workgroup = testgroup
    follow symlinks = no
[user]
    path = /home/%U
    read only = no
M:\>net use j: \\etb-111\user
Username: sandy
Password: ***

%U was found here

Set file mode creation mask

As default a remote Win client creates a file on the server 744 = rwxr–r–. The mask can be changed with in smb.conf to e.g. the linux default 644 = rw-r–r–:

[global]
    create mask = 0644
Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/samba.1325494170.txt.gz · Zuletzt geändert: 2012-01-02 08:49 von becki

Impressum - Datenschutzerklärung