Portál AbcLinuxu, 12. května 2025 09:18
Dobry den,
mam sambu a na nej zopar zdielanych adresarov. Chcel by som pre jeden adresar povolit iba par userov aby sa tam dostali heslom. Co vsetko potrebujem pre to spraviť? Skusal som nieco riesit ale neako sa mi to nepodarilo. Pre vytvorenie samba uživateľa musi byť aj taky isty user aj pod linuxom, alebo stači mať iba samba usera a ten sa dostane na sambu ale nie do linuxu? Čo všetko treba v konfiguraku zmeniť aby boli niektore adresare verejne a jeden iba pre tych userov a pod heslom?
teraz mam v smb.conf:
[global]
workgroup = xxxx
server string = server
; wins support = no
dns proxy = no
name resolve order = lmhosts host wins bcast
interfaces = lo eth1
bind interfaces only = true
log file = /var/log/samba/log.%m
max log size = 1000
; syslog only = no
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = false
passdb backend = tdbsam
obey pam restrictions = yes
guest account = nobody
invalid users = root
; unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
; domain logons = yes
; logon path = \\%N\profiles\%U
; logon path = \\%N\%U\profile
; logon drive = H:
; logon home = \\%N\%U
; logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
socket options = TCP_NODELAY
; domain master = auto
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
[homes]
comment = Home Directories
browseable = no
writable = no
create mask = 0700
directory mask = 0700
[install]
comment = Instalacky, drivre, atd.
path = /home/samba/install
include = /etc/samba/include/install/%I
guest ok = Yes
force user = nobody
force group = nogroup
writeable = yes
browseable = yes
[public]
comment = Public
path = /home/samba/public
include = /etc/samba/include/data/%I
guest ok = Yes
force user = nobody
force group = nogroup
writeable = yes
browseable = yes
plus ešte neake ďaľšie adresare
Ďakujem pekne
este trochu upresnenie: všetky adresare aby boli pristupne bez hesla ako doteraz a ten jeden aby bol iba pre skupinu userov a pod heslom :)
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.