Samba Fragen/Probleme

T

toob9x

Grünschnabel
Hallo zusammen,
ich habe soeben erfolgreich Samba auf meinem alten Computer installiert, und habe jetzt ein paar Fragen an euch Erfahrenen!

Auf dem Server läuft nun Ubuntu 8.04 und das aktuelle Samba, was man durch den Paketmanager bekommt.

Nun bin ich schon so weit, dass ich den Server in der Netzwerkumgebung von meinem Main-Rechner mit Windows XP Home sehe, und auch drauf zugreifen kann.
Ich habe für Samba einen Ordner angelegt wo alle Rechner in meinem Netzwerk drauf zugreifen sollen. (Lesen und Schreiben)

Das habe ich so gemacht:
Code:
[Share]
   comment = Share
   read only = yes
   locking = no
   path = /home/share
   guest ok = yes

Nun habe ich ein Problem,
ich kann mit Windows zwar auf den Ordner "Share" zugreifen, aber nicht rein schreiben.

Wie muss ich das Einstellen, dass es geht?

Hier mal meine komplette " smb.cof "

Code:
#======================= Global Settings =======================
[global]

# Netzwerkname
   workgroup = MSHEIMNETZ

# server string is the equivalent of the NT Description field
   server string = FileServer

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
;   security = user

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

;   guest account = nobody
   invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how nsuccessful authentication attempts are mapped 
# to anonymous connections
map to guest = bad user

############ Misc ############

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares.  This will share each
# user's home directory as \\server\username
[homes]
   comment = Home Directories
   browseable = yes

[Share]
   comment = Share
   read only = yes
   locking = no
   path = /home/share
   guest ok = yes

Ich danke schoneinmal für eure Antworten!

Ps: Ist das erste mal das ich mit Linux arbeite!
Ps²: Erster Post! :)

Edit: Oh.. erster Post und gleich ein Fehler gemacht.
An die Mods: Bitte in den Samba-Bereich verschieben!
 
Zuletzt bearbeitet:

Äh.. ups!

Naja, jetzt gehts!
Habe meine smb.conf noch ein bisschen aufgeräumt.

Code:
[global]
	workgroup = MSHEIMNETZ
	os level = 20
	null passwords = yes
	encrypt passwords = yes
	server string = FileServer
	security = share

[Share]
   comment = Share
   read only = no
   locking = no
   path = /home/share
   guest ok = yes

So, nun stellt sich für mich die nächste Frage:
Ich möchte noch einen Ordner haben, wo nur ich drauf Zugriff hab, am Besten mit einem Passwort!

Wie kann ich das am besten umsetzen?

:hilfe2:
 
Ich sollte wirklich besser Lesen, und nicht nur drüber fliegen.

Habe jetzt den Eintrag wie folgt gemacht:
Code:
[Privat]
   comment = Privat
   read only = no
   locking = no
   path = /home/privat
   guest ok = no

Nun komm ich aber immer noch ganz normal in den Ordner, ohne irgendwelche Abfragen wegen Passwort oder sonstigem.
(Genauso wie in den Public Ordner)
 
Danke für den Link, Nemesis.

Wenn ich das so mache wie dort beschrieben, muss ich schon ein Passwort eingeben, wenn ich nur auf den Server klicke.

Ich beschreibe nochmal wie ich es gerne haben möchte:

Wenn ich in der Windows Netzwerkumgebung auf den Server klicke -> Kein Passwort.
--
Wenn ich auf dem Server bin, sehe ich 2 Verzeichnisse: Share (Public) und Privat.
--
In Share, dem Public Ordner wo jeder schreiben und lesen kann, soll kein Passwort sein. (So ist es im moment auch Eingestellt)
--
In dem Ordner Privat sollen nur Private Sachen von mir rein, und deswegen soll dort (nur in diesem Ordner) auch ein Passwort sein, damit nur ich an die Daten komme.

-------

Hier nochmal meine Aktuelle smb.conf:

Code:
[global]
  security = share
  workgroup = MSHEIMNETZ
  guest account = gast
  encrypted passwords = Yes

[Share]
  path = /home/share
  public = yes
  only guest = yes
  guest account = hans
  writable = yes
  printable = no

[Privat]
  comment = Privat
  path = /home/privat
  public = no
  writable = yes
  printable = no
 
Stell mal das ganze auf "Sicherheit auf Benutzerebene" um (wie es im Link von Nemesis auch gemacht wurde):

Code:
security = user

Wenn du dann deine Samba- und Windowsbenutzernamen richtig eingestellt hast, sollte er nur dann nach einem Kennwort fragen, wenn der aktuelle Benutzer keine Rechte auf dieser Freigabe hat.

Denk daran, dass du für jeden Benutzer auf dem Linuxrechner auch ein Sambabenutzer angelegt sein muss. Außerdem müssen die Benutzernamen und Kennwörter auf dem Windows- und dem Linuxrechner übereinstimmen (Die Benutzernamen kannst du auch mit dem Befehl "username map" umleiten). Samba kann außerdem nicht die Linuxzugriffsrechte aushebeln. Achte also darauf, dass die Freigabe auf dem Linuxrechner vom jeweiligen Benutzer auch gelesen/beschrieben werden kann.
 

Ähnliche Themen

Samba 3.6.25 - OpenLDAP Setup

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Samba 4.9.5-Debian - Kennwort von unix übernehmen

Nginx als Reverse Proxy für Nextcloud und Emby

Samba-Server mit Univention Corporate Server

Zurück
Oben