Samba Freigabe

Patrick_86

Ensign
Registriert
Juni 2007
Beiträge
175
Hallo!

Habe einen Fileserver mit Samba im Netzwerk stehen, und möchte folgendes gerne realisieren:

Ein freigegebener Ordner, wo jeder lesend darauf zugreifen kann. Gleichzeit möchte ich mit einem speziellen User schreib rechte haben.

So hab ich die freigabe angegeben:

[Daten]
path = /bla
public = yes
guest ok = yes
writeable = yes
write list = patrick
force directory mode = 777
force create mode = 777
force user = patrick
valid users = patrick
create mode = 777
user = patrick
directory mode = 777

Aber es funktioniert nicht. Nach dem öffnen der Freigabe werde ich nach einem User gefragt.

weiß jemand rat?
 
ja, share ist meistens doof.

NOTE ABOUT USERNAME/PASSWORD VALIDATION
There are a number of ways in which a user can connect to a service.
The server uses the following steps in determining if it will allow a
connection to a specified service. If all the steps fail, the
connection request is rejected. However, if one of the steps succeeds,
the following steps are not checked.

If the service is marked "guest only = yes" and the server is running
with share-level security ("security = share", steps 1 to 5 are
skipped.

1. If the client has passed a username/password pair and that
username/password pair is validated by the UNIX system's password
programs, the connection is made as that username. This includes
the \\server\service%username method of passing a username.

2. If the client has previously registered a username with the system
and now supplies a correct password for that username, the
connection is allowed.

3. The client's NetBIOS name and any previously used usernames are
checked against the supplied password. If they match, the
connection is allowed as the corresponding user.

4. If the client has previously validated a username/password pair
with the server and the client has passed the validation token,
that username is used.

5. If a user = field is given in the smb.conf file for the service and
the client has supplied a password, and that password matches
(according to the UNIX system's password checking) with one of the
usernames from the user = field, the connection is made as the
username in the user = line. If one of the usernames in the user =
list begins with a @, that name expands to a list of names in the
group of the same name.

6. If the service is a guest service, a connection is made as the
username given in the guest account = for the service, irrespective
of the supplied password.

...geht aber natürlich auch.
Wenn du einfach über Netzwerkumgebung auf deinen service navigierst, dann authetifiziert sich deine Windowskiste mit deinem aktuellen Benutzernamen.
Am besten du verbindest ein Netzlaufwerk und gibst dort bereits einen Benutzernamen und nen Passwort ein.

Gib in einer Linux-Kommandozeile "man smb.conf" ein und lies erstmal.

gruß
hostile

PS: Hast du einen Samba-Benutzer angelegt? smbpasswd -a <Benutzername>
Dabei prüft smbpasswd ob der Benutzer im System (/etc/passwd usw.) vorhanden ist (ok) oder nicht (Fehler).
Samba hat ne eigene Benutzer/Passwort-Datenbank. Du kannst auch LDAP zum authetifizieren benutzen oder die authentifizierung auf die System-Dateien (die o.g. /etc/passwd...) lenken.
Je nach Distribution kann es eine andere Einstellung per default geben.
 
Zuletzt bearbeitet:
Hier greifen keine Windowsrechner drauf zu, sondern mediaboxen. Bisher habe ich die Freigabe so realisiert:

[test]
path = /bla
public = yes
guest ok = yes

Hier kann jeder die Freigaben sehen, und ohne Benutzername und Passwort lesend darauf zugreifen.
Ich möchte einfach zusätzlich von meiner Windowskiste mit meinem angemeldeten Benutzer mit schreibrechten drauf zugreifen. Der Benutzer existiert natürlich in Samba.

Es gibt ja auch freigaben, für wo ich mit meine user darauf zugreifen kann, das funktioniert:

[DOWNLOAD]
writeable = yes
path = bla
write list = patrick
force directory mode = 777
force create mode = 777
force user = patrick
valid users = patrick
user = patrick
create mode = 777
directory mode = 777
 
Funktioniert so. Aber du kannst nicht über "Netzwerkumgebung" auf den Service (\\kiste\bla) zugreifen. Geh über Netzlaufwerk verbinden und gib dabei Benutzer und Passwort an.

gruß
hostile
 
Tja, da haben wir das Problem. :D

Hier greifen keine Windowsrechner drauf zu, sondern mediaboxen.

Bei der WD Mediabox kann ich keine Netzlaufwerke verbinden!
 
..............................
[Test]
path = /mnt/samba/public
writeable = no
guest ok = yes

[Test-Write]
path = /mnt/samba/public
writeable = yes
write list = User01
force directory mode = 777
force create mode = 777
force user = User01
valid users = User01
user = User01
create mode = 777
directory mode= 777

Nina-VM ~ # ls -la /mnt/samba/public/
total 16
drwxrwxr-x 4 root sambashare 4096 2010-11-02 15:15 .
drwxr-xr-x 4 root sambashare 4096 2010-10-06 10:53 ..
drwxrwxrwx 2 User01 User01 4096 2010-11-02 15:15 asd
drwxrwxrwx 2 root sambashare 4096 2010-10-07 11:16 upload

Einige Parameter von dir dürften unnütz sein, aber das spielt keine Rolle.

gruß
hostile
Ergänzung ()

Achso. Haha... ^^ Moment...

gruß
hostile
Ergänzung ()

Patrick_86 schrieb:
Ich möchte einfach zusätzlich von meiner Windowskiste mit meinem angemeldeten Benutzer mit schreibrechten drauf zugreifen. Der Benutzer existiert natürlich in Samba.

gruß
hostile
 
Ja mit einer zweiten Freigabe hab ich das auch schon realisiert. :D
War mir nur etwas zu umständlich. ;)
 
Zurück
Oben