Frage zu Samba

Hallo,

ich habe mit folgendem Befehl einen Systemuser angelegt:
Code:
sudo  adduser --no-create-home --disabled-login --shell /bin/false anne
habe dann einen Sambauser anglegt:
Code:
sudo smbpasswd -a anne
dann habe ich diese Freigabe angelegt:
Code:
[fotospeicher]
path = /media/tosh1000/fotospeicher
comment = Speicher für Fotos
valid users = anne
writeable = yes
read only = no
dann habe ich das Kommentarzeichen dieser Zeile in der smb.conf entfernt:
Code:
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
   valid users = %S


Ergebnis ist: Ich kann zwar mit einem anderen user als anne auf die richtige Freigabe zugreifen, nur mit dem user anne geht es nicht! Warum nicht?
 
Was sagt denn die smb.log, wenn du dich versuchst mit 'anne' einzuloggen?
 
smb.log habe ich nicht. ich habe nur einen unterordner samba in /var/log. da liegen ne ganze menge dateien drin. aber nichts was mir irgendwie weiterhilft.

dem datum nach zu urteilen werden die meisten dateien in dem ordner nicht verändert, bzw. sind vor längerer zeit das letzte mal verändert worden. die aktuellen änderungen geben keinen aufschluss über useranmeldungen.

habe ich vielleicht noch vergessen eine einstellung vorzunehmen? das kann doch eigentlich nicht so schwer sein, einen neuen user hinzu zufügen.
 
Dann pack doch mal in deinen global-Abschnitt den Kram für's Logging rein. Ohne Logs Fehler analysieren ist ziemlich schwierig.

Code:
log level = 2
log file = /var/log/samba.log.%m
max log size = 50
debug timestamp = yes
 
Hab ich gemacht.

Ich habs allerdings nach /var/log/samba gelegt, weil ich da sicher bin, dass samba da reinschreiben kann.

samba.log wird aber nicht angelegt. Neustart habe ich gemacht und useranmeldung habe ich auch schon paar mal versucht.
 
Was sagt denn 'ls -a /var/log/samba/' bei dir? Es ist irgendwie recht ungewöhnlich, wenn der Samba nichtmal seinen Startup loggt, wenn ein Log-Level von 2 (Debug-Logging) definiert ist.
 
Also erstmal habe ich jetzt in einem Logfile (log.p3000d) folgendes gefunden (wobei p3000d mein maschinenname ist):

Code:
[2014/09/29 16:08:18.739300,  2] auth/auth.c:309(check_ntlm_password)
  check_ntlm_password:  authentication for user [anne] -> [anne] -> [anne] succeeded
[2014/09/29 16:08:18.781036,  2] smbd/service.c:627(create_connection_session_info)
  user 'anne' (from session setup) not permitted to access this share (tosh1000)
[2014/09/29 16:08:18.781764,  1] smbd/service.c:805(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

Bisschen merkwürdig finde ich, dass da steht, ich würde auf tosh1000 zugreifen wollen, wo ich doch auf fotospeicher zugreifen will.


ls -trl sagt:

Code:
insgesamt 14748
drwx------ 4 root root    4096 M�r  3  2013 cores
-rw-r--r-- 1 root root       0 M�r  3  2013 log.192.168.178.28
-rw-r--r-- 1 root root       0 M�r  3  2013 log.mac0026b0dd180c
-rw-r--r-- 1 root root       0 M�r  3  2013 log.192.168.178.35
-rw-r--r-- 1 root root       0 M�r  4  2013 log.localhost
-rw-r--r-- 1 root root    2223 M�r  4  2013 log.192.168.178.40
-rw-r--r-- 1 root root    1482 M�r  4  2013 log.192.168.178.101
-rw-r--r-- 1 root root       0 M�r  5  2013 log.192.168.178.23
-rw-r--r-- 1 root root       0 M�r  5  2013 log.andre-thinkpad-
-rw-r--r-- 1 root root 1024930 M�r  6  2013 log.jcifs0_1_95.old
-rw-r--r-- 1 root root  420240 M�r  6  2013 log.jcifs0_1_95
-rw-r--r-- 1 root root       0 M�r  6  2013 log.jcifs0_1_06
-rw-r--r-- 1 root root       0 M�r  7  2013 log.jcifs0_1_bc
-rw-r--r-- 1 root root  360400 M�r  9  2013 log.jcifs0_1_d6
-rw-r--r-- 1 root root   19550 M�r  9  2013 log.jcifs0_1_3a
-rw-r--r-- 1 root root    6120 M�r  9  2013 log.jcifs0_1_7e
-rw-r--r-- 1 root root 1028500 M�r  9  2013 log.jcifs0_1_b2.old
-rw-r--r-- 1 root root 1028670 M�r  9  2013 log.jcifs0_1_cd.old
-rw-r--r-- 1 root root  443190 M�r  9  2013 log.jcifs0_1_cd
-rw-r--r-- 1 root root 1028500 M�r  9  2013 log.jcifs0_1_4a.old
-rw-r--r-- 1 root root 1028160 M�r  9  2013 log.jcifs0_1_0a.old
-rw-r--r-- 1 root root  808010 M�r  9  2013 log.jcifs0_1_0a
-rw-r--r-- 1 root root  379950 M�r  9  2013 log.jcifs0_1_fe
-rw-r--r-- 1 root root  157590 M�r  9  2013 log.jcifs0_1_b2
-rw-r--r-- 1 root root    1190 M�r  9  2013 log.jcifs0_1_89
-rw-r--r-- 1 root root       0 M�r  9  2013 log.jcifs0_1_ae
-rw-r--r-- 1 root root   59670 M�r  9  2013 log.jcifs0_1_30
-rw-r--r-- 1 root root  414970 M�r  9  2013 log.jcifs0_1_49
-rw-r--r-- 1 root root 1032750 M�r  9  2013 log.jcifs0_1_24.old
-rw-r--r-- 1 root root     510 M�r  9  2013 log.jcifs0_1_a2
-rw-r--r-- 1 root root  386920 M�r  9  2013 log.jcifs0_1_24
-rw-r--r-- 1 root root  556070 M�r 10  2013 log.jcifs0_1_4a
-rw-r--r-- 1 root root    3570 M�r 10  2013 log.jcifs0_1_67
-rw-r--r-- 1 root root     170 M�r 14  2013 log.jcifs0_1_7d
-rw-r--r-- 1 root root     170 M�r 15  2013 log.jcifs0_1_78
-rw-r--r-- 1 root root    2550 M�r 15  2013 log.jcifs0_1_a7
-rw-r--r-- 1 root root     170 M�r 17  2013 log.jcifs0_1_ef
-rw-r--r-- 1 root root       0 M�r 17  2013 log.jcifs0_1_ce
-rw-r--r-- 1 root root       0 M�r 17  2013 log.jcifs0_1_65
-rw-r--r-- 1 root root       0 M�r 18  2013 log.jcifs0_1_21
-rw-r--r-- 1 root root       0 M�r 18  2013 log.jcifs0_1_bf
-rw-r--r-- 1 root root       0 M�r 18  2013 log.jcifs0_1_b0
-rw-r--r-- 1 root root       0 M�r 19  2013 log.jcifs0_1_05
-rw-r--r-- 1 root root       0 M�r 19  2013 log.jcifs0_1_74
-rw-r--r-- 1 root root   43010 M�r 19  2013 log.jcifs0_1_51
-rw-r--r-- 1 root root   24480 M�r 19  2013 log.jcifs0_1_b3
-rw-r--r-- 1 root root    1020 M�r 20  2013 log.jcifs0_1_bd
-rw-r--r-- 1 root root    1870 M�r 22  2013 log.jcifs0_1_2e
-rw-r--r-- 1 root root  407150 M�r 22  2013 log.jcifs0_1_3e
-rw-r--r-- 1 root root     170 M�r 28  2013 log.jcifs0_1_41
-rw-r--r-- 1 root root    4930 Jun  2  2013 log.jcifs0_1_e8
-rw-r--r-- 1 root root    3910 Jun  2  2013 log.jcifs0_1_5b
-rw-r--r-- 1 root root       0 Jun  2  2013 log.192.168.178.56
-rw-r--r-- 1 root root       0 Jun  2  2013 log.xbian
-rw-r--r-- 1 root root    1870 Jun  3  2013 log.jcifs0_1_45
-rw-r--r-- 1 root root  335920 Jun  3  2013 log.jcifs0_1_c6
-rw-r--r-- 1 root root 1028330 Jun  3  2013 log.jcifs0_1_e5.old
-rw-r--r-- 1 root root  738480 Jun  3  2013 log.jcifs0_1_e5
-rw-r--r-- 1 root root 1031900 Jun  3  2013 log.jcifs0_1_e9.old
-rw-r--r-- 1 root root  754970 Jun  3  2013 log.jcifs0_1_e9
-rw-r--r-- 1 root root    9010 Jun  3  2013 log.jcifs0_1_60
-rw-r--r-- 1 root root       0 Jun  3  2013 log.jcifs0_1_c9
-rw-r--r-- 1 root root       0 Jun  3  2013 log.jcifs0_1_1c
-rw-r--r-- 1 root root       0 Jun  4  2013 log.jcifs0_1_2c
-rw-r--r-- 1 root root       0 Jun  5  2013 log.jcifs0_1_7c
-rw-r--r-- 1 root root       0 Jun  5  2013 log.jcifs0_1_b1
-rw-r--r-- 1 root root       0 Jun  5  2013 log.192.168.178.31
-rw-r--r-- 1 root root       0 Jun  5  2013 log.anne-thinkpad-t
-rw-r--r-- 1 root root       0 Jun  8  2013 log.jcifs0_1_03
-rw-r--r-- 1 root root       0 Jun 11  2013 log.jcifs0_1_32
-rw-r--r-- 1 root root       0 Jun 11  2013 log.jcifs0_1_6a
-rw-r--r-- 1 root root       0 Jun 11  2013 log.jcifs0_1_d2
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_0e
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_64
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_4d
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_8a
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_85
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_55
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_0d
-rw-r--r-- 1 root root       0 Jun 12  2013 log.jcifs0_1_23
-rw-r--r-- 1 root root       0 Jun 13  2013 log.jcifs0_1_e3
-rw-r--r-- 1 root root       0 Jun 13  2013 log.jcifs0_1_4c
-rw-r--r-- 1 root root       0 Jun 13  2013 log.jcifs0_1_46
-rw-r--r-- 1 root root       0 Jun 13  2013 log.jcifs0_1_68
-rw-r--r-- 1 root root       0 Jun 13  2013 log.jcifs0_1_ec
-rw-r--r-- 1 root root       0 Jun 14  2013 log.jcifs0_1_4f
-rw-r--r-- 1 root root       0 Jun 14  2013 log.jcifs0_1_c1
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_80
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_8d
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_9f
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_28
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_33
-rw-r--r-- 1 root root       0 Jun 15  2013 log.androidphone
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_e6
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_69
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_f2
-rw-r--r-- 1 root root       0 Jun 15  2013 log.jcifs0_1_da
-rw-r--r-- 1 root root       0 Jun 16  2013 log.jcifs0_1_98
-rw-r--r-- 1 root root       0 Jun 17  2013 log.jcifs0_1_61
-rw-r--r-- 1 root root       0 Jun 18  2013 log.jcifs0_1_58
-rw-r--r-- 1 root root       0 Jun 19  2013 log.jcifs0_1_de
-rw-r--r-- 1 root root       0 Jun 19  2013 log.jcifs0_1_71
-rw-r--r-- 1 root root       0 Jun 19  2013 log.jcifs0_1_b5
-rw-r--r-- 1 root root       0 Jun 20  2013 log.jcifs0_1_e2
-rw-r--r-- 1 root root       0 Jun 20  2013 log.jcifs0_1_cf
-rw-r--r-- 1 root root       0 Jun 21  2013 log.jcifs0_1_02
-rw-r--r-- 1 root root       0 Jun 21  2013 log.jcifs0_1_e1
-rw-r--r-- 1 root root       0 Jun 22  2013 log.jcifs0_1_d5
-rw-r--r-- 1 root root       0 Jun 22  2013 log.jcifs0_1_75
-rw-r--r-- 1 root root       0 Jun 23  2013 log.jcifs0_1_d9
-rw-r--r-- 1 root root       0 Jun 24  2013 log.jcifs0_1_93
-rw-r--r-- 1 root root       0 Jun 26  2013 log.jcifs0_1_bb
-rw-r--r-- 1 root root       0 Jun 26  2013 log.jcifs0_1_22
-rw-r--r-- 1 root root       0 Jun 28  2013 log.jcifs0_1_01
-rw-r--r-- 1 root root       0 Jun 28  2013 log.jcifs0_1_81
-rw-r--r-- 1 root root       0 Jun 29  2013 log.jcifs0_1_cc
-rw-r--r-- 1 root root       0 Jun 30  2013 log.jcifs0_1_6e
-rw-r--r-- 1 root root       0 Jul  1  2013 log.jcifs0_1_39
-rw-r--r-- 1 root root       0 Jul  1  2013 log.jcifs0_1_26
-rw-r--r-- 1 root root       0 Jul  3  2013 log.jcifs0_1_1e
-rw-r--r-- 1 root root       0 Jul  3  2013 log.jcifs0_1_fc
-rw-r--r-- 1 root root       0 Jul  5  2013 log.jcifs0_1_38
-rw-r--r-- 1 root root       0 Jul  7  2013 log.jcifs0_1_d0
-rw-r--r-- 1 root root       0 Jul  8  2013 log.jcifs0_1_97
-rw-r--r-- 1 root root       0 Jul  8  2013 log.jcifs0_1_cb
-rw-r--r-- 1 root root       0 Jul 10  2013 log.jcifs0_1_5a
-rw-r--r-- 1 root root       0 Jul 11  2013 log.jcifs0_1_5f
-rw-r--r-- 1 root root       0 Jul 11  2013 log.jcifs0_1_1d
-rw-r--r-- 1 root root       0 Jul 12  2013 log.jcifs0_1_ad
-rw-r--r-- 1 root root       0 Jul 12  2013 log.jcifs0_1_b7
-rw-r--r-- 1 root root       0 Jul 13  2013 log.jcifs0_1_ba
-rw-r--r-- 1 root root       0 Jul 13  2013 log.jcifs0_1_70
-rw-r--r-- 1 root root       0 Jul 14  2013 log.jcifs0_1_19
-rw-r--r-- 1 root root       0 Jul 14  2013 log.jcifs0_1_73
-rw-r--r-- 1 root root       0 Jul 14  2013 log.jcifs0_1_83
-rw-r--r-- 1 root root       0 Jul 14  2013 log.jcifs0_1_4b
-rw-r--r-- 1 root root       0 Jul 15  2013 log.jcifs0_1_f5
-rw-r--r-- 1 root root       0 Jul 16  2013 log.jcifs0_1_14
-rw-r--r-- 1 root root       0 Jul 16  2013 log.jcifs0_1_17
-rw-r--r-- 1 root root       0 Jul 16  2013 log.jcifs0_1_ab
-rw-r--r-- 1 root root       0 Jul 16  2013 log.jcifs0_1_5e
-rw-r--r-- 1 root root       0 Jul 17  2013 log.jcifs0_1_04
-rw-r--r-- 1 root root       0 Jul 17  2013 log.jcifs0_1_18
-rw-r--r-- 1 root root       0 Jul 17  2013 log.jcifs0_1_43
-rw-r--r-- 1 root root       0 Jul 18  2013 log.jcifs0_1_c7
-rw-r--r-- 1 root root       0 Jul 18  2013 log.jcifs0_1_eb
-rw-r--r-- 1 root root       0 Jul 19  2013 log.jcifs0_1_36
-rw-r--r-- 1 root root       0 Jul 20  2013 log.jcifs0_1_3c
-rw-r--r-- 1 root root       0 Jul 20  2013 log.jcifs0_1_fd
-rw-r--r-- 1 root root       0 Jul 21  2013 log.jcifs0_1_31
-rw-r--r-- 1 root root       0 Jul 21  2013 log.jcifs0_1_44
-rw-r--r-- 1 root root       0 Jul 24  2013 log.jcifs0_1_a0
-rw-r--r-- 1 root root       0 Jul 26  2013 log.jcifs0_1_82
-rw-r--r-- 1 root root       0 Jul 26  2013 log.jcifs0_1_42
-rw-r--r-- 1 root root       0 Jul 26  2013 log.winplane
-rw-r--r-- 1 root root       0 Jul 28  2013 log.jcifs0_1_f0
-rw-r--r-- 1 root root       0 Jul 28  2013 log.jcifs0_1_ea
-rw-r--r-- 1 root root       0 Jul 29  2013 log.jcifs0_1_f3
-rw-r--r-- 1 root root       0 Jul 30  2013 log.jcifs0_1_27
-rw-r--r-- 1 root root       0 Jul 31  2013 log.jcifs0_1_77
-rw-r--r-- 1 root root       0 Jul 31  2013 log.jcifs0_1_b8
-rw-r--r-- 1 root root       0 Jul 31  2013 log.jcifs0_1_8e
-rw-r--r-- 1 root root       0 Aug  4  2013 log.jcifs0_1_9e
-rw-r--r-- 1 root root       0 Aug  5  2013 log.jcifs0_1_72
-rw-r--r-- 1 root root       0 Aug  6  2013 log.jcifs0_1_8c
-rw-r--r-- 1 root root       0 Aug  6  2013 log.jcifs0_1_dc
-rw-r--r-- 1 root root       0 Aug  6  2013 log.jcifs0_1_96
-rw-r--r-- 1 root root       0 Aug  6  2013 log.jcifs0_1_c3
-rw-r--r-- 1 root root       0 Aug  7  2013 log.jcifs0_1_d1
-rw-r--r-- 1 root root       0 Aug  7  2013 log.jcifs0_1_f1
-rw-r--r-- 1 root root       0 Aug 10  2013 log.jcifs0_1_2d
-rw-r--r-- 1 root root       0 Aug 11  2013 log.jcifs0_1_d8
-rw-r--r-- 1 root root       0 Aug 11  2013 log.jcifs0_1_c2
-rw-r--r-- 1 root root   11520 Aug 11  2013 log.jcifs0_1_1f
-rw-r--r-- 1 root root       0 Aug 12  2013 log.jcifs0_1_af
-rw-r--r-- 1 root root    4580 Aug 12  2013 log.jcifs0_1_fb
-rw-r--r-- 1 root root       0 Aug 12  2013 log.jcifs0_1_a5
-rw-r--r-- 1 root root       0 Aug 12  2013 log.jcifs0_1_6c
-rw-r--r-- 1 root root       0 Aug 12  2013 log.jcifs0_1_5c
-rw-r--r-- 1 root root       0 Aug 14  2013 log.jcifs0_1_6f
-rw-r--r-- 1 root root       0 Aug 14  2013 log.jcifs0_1_76
-rw-r--r-- 1 root root       0 Aug 14  2013 log.jcifs0_1_8b
-rw-r--r-- 1 root root       0 Aug 15  2013 log.jcifs0_1_e7
-rw-r--r-- 1 root root       0 Aug 15  2013 log.jcifs0_1_7f
-rw-r--r-- 1 root root       0 Aug 16  2013 log.jcifs0_1_00
-rw-r--r-- 1 root root       0 Aug 16  2013 log.jcifs0_1_3d
-rw-r--r-- 1 root root       0 Aug 16  2013 log.jcifs0_1_88
-rw-r--r-- 1 root root       0 Aug 16  2013 log.jcifs0_1_50
-rw-r--r-- 1 root root    2086 Aug 18  2013 log.jcifs0_1_0c
-rw-r--r-- 1 root root       0 Aug 18  2013 log.jcifs0_1_ac
-rw-r--r-- 1 root root       0 Aug 18  2013 log.jcifs0_1_a9
-rw-r--r-- 1 root root     437 Aug 19  2013 log.jcifs0_1_66
-rw-r--r-- 1 root root     447 Aug 19  2013 log.jcifs0_1_c8
-rw-r--r-- 1 root root       0 Aug 19  2013 log.jcifs0_1_9d
-rw-r--r-- 1 root root       0 Aug 19  2013 log.jcifs0_1_7a
-rw-r--r-- 1 root root     149 Aug 20  2013 log.jcifs0_1_8f
-rw-r--r-- 1 root root       0 Aug 20  2013 log.jcifs0_1_3f
-rw-r--r-- 1 root root       0 Aug 22  2013 log.jcifs0_1_d3
-rw-r--r-- 1 root root       0 Aug 22  2013 log.jcifs0_1_37
-rw-r--r-- 1 root root       0 Aug 24  2013 log.jcifs0_1_a8
-rw-r--r-- 1 root root       0 Aug 24  2013 log.jcifs0_1_ca
-rw-r--r-- 1 root root       0 Aug 24  2013 log.jcifs0_1_54
-rw-r--r-- 1 root root       0 Aug 26  2013 log.jcifs0_1_52
-rw-r--r-- 1 root root       0 Aug 29  2013 log.jcifs0_1_29
-rw-r--r-- 1 root root       0 Aug 29  2013 log.jcifs0_1_d4
-rw-r--r-- 1 root root       0 Aug 29  2013 log.jcifs0_1_10
-rw-r--r-- 1 root root       0 Aug 31  2013 log.jcifs0_1_48
-rw-r--r-- 1 root root       0 Sep  1  2013 log.192.168.178.2
-rw-r--r-- 1 root root       0 Sep  1  2013 log.jcifs0_1_f8
-rw-r--r-- 1 root root       0 Sep  2  2013 log.jcifs0_1_87
-rw-r--r-- 1 root root       0 Sep  4  2013 log.jcifs0_1_13
-rw-r--r-- 1 root root       0 Sep  9  2013 log.jcifs0_1_a6
-rw-r--r-- 1 root root       0 Sep 10  2013 log.jcifs0_1_7b
-rw-r--r-- 1 root root       0 Sep 13  2013 log.jcifs0_1_84
-rw-r--r-- 1 root root       0 Sep 14  2013 log.jcifs0_1_91
-rw-r--r-- 1 root root    1440 Sep 15  2013 log.jcifs0_1_47
-rw-r--r-- 1 root root       0 Sep 16  2013 log.jcifs0_1_2b
-rw-r--r-- 1 root root       0 Sep 20  2013 log.jcifs0_1_20
-rw-r--r-- 1 root root       0 Sep 21  2013 log.jcifs0_1_0b
-rw-r--r-- 1 root root       0 Sep 22  2013 log.jcifs0_1_5d
-rw-r--r-- 1 root root       0 Sep 26  2013 log.jcifs0_1_d7
-rw-r--r-- 1 root root       0 Sep 27  2013 log.jcifs0_1_db
-rw-r--r-- 1 root root       0 Sep 27  2013 log.jcifs0_1_b9
-rw-r--r-- 1 root root       0 Okt  4  2013 log.jcifs0_1_11
-rw-r--r-- 1 root root    1043 Okt  9  2013 log.jcifs0_1_56
-rw-r--r-- 1 root root    1490 Okt  9  2013 log.jcifs0_1_4e
-rw-r--r-- 1 root root       0 Okt 11  2013 log.jcifs0_1_a4
-rw-r--r-- 1 root root       0 Okt 11  2013 log.jcifs0_1_f9
-rw-r--r-- 1 root root       0 Okt 11  2013 log.jcifs0_1_dd
-rw-r--r-- 1 root root    2880 Okt 12  2013 log.jcifs0_1_86
-rw-r--r-- 1 root root       0 Okt 13  2013 log.jcifs0_1_c4
-rw-r--r-- 1 root root       0 Okt 13  2013 log.jcifs0_1_59
-rw-r--r-- 1 root root       0 Okt 15  2013 log.jcifs0_1_ed
-rw-r--r-- 1 root root       0 Okt 15  2013 log.jcifs0_1_e4
-rw-r--r-- 1 root root       0 Okt 20  2013 log.jcifs0_1_a1
-rw-r--r-- 1 root root       0 Okt 21  2013 log.jcifs0_1_79
-rw-r--r-- 1 root root       0 Okt 21  2013 log.192.168.178.37
-rw-r--r-- 1 root root       0 Okt 21  2013 log.developer
-rw-r--r-- 1 root root       0 Okt 25  2013 log.jcifs0_1_25
-rw-r--r-- 1 root root       0 Okt 31  2013 log.jcifs0_1_b6
-rw-r--r-- 1 root root       0 Nov  2  2013 log.jcifs0_1_62
-rw-r--r-- 1 root root       0 Nov  3  2013 log.jcifs0_1_12
-rw-r--r-- 1 root root       0 Nov  7  2013 log.jcifs0_1_c0
-rw-r--r-- 1 root root    2870 Nov  7  2013 log.jcifs0_1_2a
-rw-r--r-- 1 root root    1057 Nov  7  2013 log.jcifs0_1_40
-rw-r--r-- 1 root root     453 Nov  8  2013 log.jcifs0_1_9c
-rw-r--r-- 1 root root       0 Nov 11  2013 log.jcifs0_1_c5
-rw-r--r-- 1 root root       0 Nov 12  2013 log.192.168.178.39
-rw-r--r-- 1 root root       0 Nov 12  2013 log.jcifs0_1_b4
-rw-r--r-- 1 root root    1939 Nov 13  2013 log.jcifs0_1_15
-rw-r--r-- 1 root root     149 Nov 14  2013 log.jcifs0_1_aa
-rw-r--r-- 1 root root     745 Nov 16  2013 log.jcifs0_1_6b
-rw-r--r-- 1 root root     447 Nov 16  2013 log.jcifs0_1_1b
-rw-r--r-- 1 root root     302 Nov 18  2013 log.jcifs0_1_35
-rw-r--r-- 1 root root     151 Nov 19  2013 log.jcifs0_1_6d
-rw-r--r-- 1 root root     151 Nov 19  2013 log.jcifs0_1_be
-rw-r--r-- 1 root root       0 Nov 19  2013 log.jcifs0_1_f4
-rw-r--r-- 1 root root     350 Nov 24  2013 log.jcifs0_1_53
-rw-r--r-- 1 root root    6300 Nov 24  2013 log.jcifs0_1_9b
-rw-r--r-- 1 root root     540 Nov 24  2013 log.jcifs0_1_99
-rw-r--r-- 1 root root       0 Nov 30  2013 log.jcifs0_1_ee
-rw-r--r-- 1 root root     527 Dez  1  2013 log.winxp-virt
-rw-r--r-- 1 root root    1080 Dez  3  2013 log.jcifs0_1_07
-rw-r--r-- 1 root root       0 Dez  4  2013 log.jcifs0_1_08
-rw-r--r-- 1 root root    1212 Dez  6  2013 log.andre-iqycb4ix4
-rw-r--r-- 1 root root       0 Dez  7  2013 log.jcifs0_1_e0
-rw-r--r-- 1 root root       0 Dez 10  2013 log.jcifs0_1_63
-rw-r--r-- 1 root root       0 Dez 14  2013 log.jcifs0_1_fa
-rw-r--r-- 1 root root       0 Dez 22  2013 log.jcifs0_1_09
-rw-r--r-- 1 root root       0 Dez 25  2013 log.jcifs0_1_16
-rw-r--r-- 1 root root       0 Dez 26  2013 log.jcifs0_1_34
-rw-r--r-- 1 root root       0 Jan  3  2014 log.jcifs0_1_f7
-rw-r--r-- 1 root root       0 Jan  3  2014 log.jcifs0_1_3b
-rw-r--r-- 1 root root       0 Jan  3  2014 log.jcifs0_1_f6
-rw-r--r-- 1 root root       0 Jan  6  2014 log.192.168.178.50
-rw-r--r-- 1 root root     441 Jan 16  2014 log.nmbd.7.gz
-rw-r--r-- 1 root root       0 Jan 26  2014 log.jcifs0_1_a3
-rw-r--r-- 1 root root       0 Jan 29  2014 log.jcifs0_1_90
-rw-r--r-- 1 root root       0 Feb 13  2014 log.jcifs0_1_9a
-rw-r--r-- 1 root root       0 M�r  5  2014 log.jcifs0_1_2f
-rw-r--r-- 1 root root       0 M�r  7  2014 log.jcifs0_1_57
-rw-r--r-- 1 root root    1056 M�r 20  2014 log.anne-thinkpad-t60
-rw-r--r-- 1 root root    8752 Apr  9 13:34 log.andre-thinkpad-t60
-rw-r--r-- 1 root root     408 Apr 10 17:37 log.nmbd.6.gz
-rw-r--r-- 1 root root     446 Apr 11 18:25 log.nmbd.5.gz
-rw-r--r-- 1 root root   10478 Mai 12 11:56 log.p3000
-rw-r--r-- 1 root root     408 Mai 14 15:55 log.nmbd.4.gz
-rw-r--r-- 1 root root     408 Mai 20 13:50 log.nmbd.3.gz
-rw-r--r-- 1 root root       0 Jun  9 13:34 log.
-rw-r--r-- 1 root root     409 Jun 10 21:34 log.nmbd.2.gz
-rw-r--r-- 1 root root       0 Jun 16 21:57 log.jcifs0_1_94
-rw-r--r-- 1 root root     561 Jun 21 18:34 log.nmbd.1.gz
-rw-r--r-- 1 root root       0 Jun 28 00:53 log.jcifs0_1_92
-rw-r--r-- 1 root root       0 Jul 31 15:20 log.jcifs0_1_0f
-rw-r--r-- 1 root root       0 Aug  5 20:02 log.192.168.178.46
-rw-r--r-- 1 root root   13393 Aug 17 06:19 log.smbd.7.gz
-rw-r--r-- 1 root root   13399 Aug 24 06:21 log.smbd.6.gz
-rw-r--r-- 1 root root   13370 Aug 31 06:23 log.smbd.5.gz
-rw-r--r-- 1 root root   13471 Sep  7 06:24 log.smbd.4.gz
-rw-r--r-- 1 root root   13377 Sep 14 06:13 log.smbd.3.gz
-rw-r--r-- 1 root root   13359 Sep 21 06:15 log.smbd.2.gz
-rw-r--r-- 1 root root   13442 Sep 28 06:17 log.smbd.1.gz
-rw-r--r-- 1 root root   12422 Sep 29 15:55 log.nmbd
-rw-r--r-- 1 root root   62476 Sep 29 16:07 log.smbd
-rw-r--r-- 1 root root    1956 Sep 29 16:08 log.192.168.178.38
-rw-r--r-- 1 root root    4342 Sep 29 16:08 log.p3000d

Mein letzter Loginversuch war tatsächlich um 16:08. Von daher sollte der obige Logeintrag stammen.
 
hier das gleiche ... mit fotospeicher.

Code:
[2014/09/29 16:17:38.127553,  2] auth/auth.c:309(check_ntlm_password)
  check_ntlm_password:  authentication for user [anne] -> [anne] -> [anne] succeeded
[2014/09/29 16:17:38.168049,  2] smbd/service.c:627(create_connection_session_info)
  user 'anne' (from session setup) not permitted to access this share (fotospeicher)
[2014/09/29 16:17:38.168647,  1] smbd/service.c:805(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

Sieht aus, als hätte die Veränderung des Loglevels bewirkt, dass man die Loginversuche jetzt sehen kann. Warum er die samba.log nicht anlegt, verstehe ich zwar auch nicht. Aber ok. Was solls. Immerhin sind das jetzt die Loginversuche.
 
Könnte es vielleicht sein, dass die Zugriffsverweigerung etwas mit den Systemrechten zu tun hat? Aber wenn das so wäre, muss denn zu jedem Sambauser auch einen passenden Systemuser anlegen UND diesem die nötigen Rechte auf die Verzeichnisse geben?
 
Könnte es vielleicht sein, dass die Zugriffsverweigerung etwas mit den Systemrechten zu tun hat? Aber wenn das so wäre, muss denn zu jedem Sambauser auch einen passenden Systemuser anlegen UND diesem die nötigen Rechte auf die Verzeichnisse geben?

Da du offenbar ja smbpasswd als Passwort-Backend verwendest, das nur in Verbindung mit den Systemusern funktioniert, müssen natürlich auch die Rechte der Ordner/Shares stimmen. Üblich ist es, dass man die User für ein Share in eine bestimmte Gruppe packt und der Gruppe Lese- und Schreibrechte auf den Ordner gibt. Dadurch können die von Samba gemappten Systemuser auf diese Shares zugreifen.
 
Irgendwie klappt das nicht.

Ich habe jetzt anne und pi der gruppe samabshare hinzugefügt. außerdem habe ich mit chgrp die gesamte festplatte bearbeitet auf der die freigaben liegen. der user ist weiterhin pi.

was muss man denn da noch machen, damit das funktioniert?
 
Noch mal die Frage:

Ich habe der Gruppe sambashare das komplette Laufwerk gegeben (rekursiv). Die Richtline ist 775.
Code:
chgrp -R sambashare /media/tosh1000

Wenn ich jetzt den Systemuser anne der Gruppe sambashare hinzufüge, dann müsste doch anne auf die Freigabe zugreifen können oder nicht? Samba dürfte doch daran nichts auszusetzen haben, weil ja gilt:
Code:
valid users = anne

Und außerdem habe ich noch gemacht:
Code:
force group = sambashare

Die Anmeldung an Samba klappt auch, wie man im logfile erkennen kann.
Code:
  check_ntlm_password:  authentication for user [anne] -> [anne] -> [anne] succeeded
[2014/09/29 19:55:09.330168,  2] smbd/service.c:627(create_connection_session_info)
  user 'anne' (from session setup) not permitted to access this share (fotospeicher)
[2014/09/29 19:55:09.330859,  1] smbd/service.c:805(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

Aber wieso wird da jetzt noch der Zugriff auf die Freigabe verweigert?


PS ... Übrigens, der Grund warum Samba das von dir benannte logfile nicht erstellt hat, ist, weil ich diese Zeile zu weit oben eingetragen hatte und deshalb diese Einstellung an späterer Stelle mit einer neuen logfile einstellung überschrieben wurde. Aber das Debuglevel 2 hat er ja wenigstens angenommen, so dass jetzt die wichtigen Anmeldeeinträge geloggt werden.

PPS ... Ich kann mich mit "anne" am System anmelden (ssh), kann in den freigegebenen Ordner und dort Dateien anlegen, verändern und löschen. WARUM GEHT DAS MIT DEM SCHEISS SAMBA NICHT !!!!!
 
Zuletzt bearbeitet:
Kannst du mir mal bitte deine ganze smb.conf geben? Dann kann ich das mal in meiner Samba-Testumgebung prüfen. Ich nutze smbpasswd-Backend normalerweise nicht und habe auch irgendwie das dumpfe Gefühl, dass sich evtl. bei dir ein paar Einstellungen beissen.
 
Ja klar, gerne. Kein Problem.

Code:
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

#======================= Global Settings =======================

[global]

log level = 2
debug timestamp = yes

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = PIGROUP

# server string is the equivalent of the NT Description field
   server string = %h server

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

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

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast


#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### 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

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# 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

# 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

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#   load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups

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

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# 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

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
#   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

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

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

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

[homes]
comment = Home Directories
browseable = yes
read only = no
create mode = 0755

[pi]
path = /home/pi
comment = home storage
browseable = yes
valid users = pi
writable = yes
read only = no

[tosh1000]
path = /media/tosh1000
comment = file storage
browseable = yes
valid users = pi
writable = yes
read only = no

[fotospeicher]
path = /media/tosh1000/fotospeicher
comment = Speicher für Fotos
valid users = anne
invalid users = pi 
writeable = yes
read only = no
create mode = 0660
directory mode = 0770

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
    read only = no 

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0755

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0755

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

;[printers]
;   comment = All Printers
;   browseable = no
;   path = /var/spool/samba
;   printable = yes
;   guest ok = no
;   read only = yes
;   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
;[print$]
;   comment = Printer Drivers
;   path = /var/lib/samba/printers
;   browseable = yes
;   read only = yes
;   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
#    cdrom share is accesed. For this to work /etc/fstab must contain
#    an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#    is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom
 
Ich habe jetzt die falsche Einstellung in der Datei gefunden!

Es liegt an:
Code:
valid users = %S

Wenn ich das richtig verstehe, dann dürfen aufgrund dieser Einstellung ausschliesslich die Eigentümer der jeweiligen Verzeichnisse darauf zu greifen. Eigentlich gehört das in die Sektion für die home-Verzeichnisse der User. Was das am AdW zu suchen hat, weiss ich nicht! Vielleicht könnte man diese gesamte Sambakonfiguration noch über ein paar Dateien verteilen - vielleicht so 20 oder so. Damit die Sache noch übersichtlicher wird. Mal ehrlich. Die Typen haben nen Sockenschuss.
 
Zuletzt bearbeitet:
Zurück
Oben