비밀번호를 사용하여 삼바에서 생성한 보안 공유가 작동하지 않는 것 같습니다.
/etc/samba/smb.conf
내 Linux Mint 상자(3.13.0-37-generic)에는 상자에 다음이 포함되어 있습니다.
[myshare]
comment = Home Directory
path = /home/myshare
valid users = myshare
browseable = no
public = no
security = user
readable = yes
writable = yes
guest ok = no
- 사용자의 비밀번호는 를
myshare
사용하여 생성된smbpasswd -a myshare
다음 활성화 됩니다smbpasswd -e myshare
. useradd -c "myshare" -m -s /bin/false myshare
쉘 액세스 권한이 없도록 사용자를 추가할 때 사용됩니다.
예 smb.conf
:
[global]
workgroup = WORKGROUP
dns proxy = no
; wins server = w.x.y.z
; interfaces = 127.0.0.0/8 eth0
; bind interfaces only = yes
security = user
encrypt passwords = yes
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
; logon path = \\%N\profiles\%U
; logon drive = H:
; logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
; include = /home/samba/etc/smb.conf.%m
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
; usershare max shares = 100
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
;[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
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
; write list = root, @lpadmin
[myshare]
comment = Home Directory
path = /home/myshare
valid users = myshare
browseable = no
public = no
security = user
readable = yes
writable = yes
guest ok = no
이제 서비스를 다시 시작하려고 했지만 smbd
Windows 시스템에서 공유를 매핑하면 자격 증명을 묻지 않고 그냥 열립니다.
내가 여기서 무엇을 놓치고 있는 걸까요?
답변1
usershare allow guests = yes
나는 글로벌 가치가 다루어지고 있다고 생각합니다.