Raspberry Pi NTFS SAMBA SHARE การอนุญาตไม่อนุญาต Windows 7


1

ฉันใช้เครื่อง RaspberryPi เล็ก ๆ น้อย ๆ ที่ฉันต้องการเปลี่ยนเป็นเครือข่ายพลังงานต่ำที่ไม่ได้รับการป้องกันอย่างสมบูรณ์ในเครือข่ายภายในบ้านของฉันจุดมุ่งหมายคือการเป็นสากล การถ่ายโอนข้อมูลเครือข่ายและสื่อที่ใช้ร่วมกัน

ฉันได้ติดตั้งไดรฟ์ USB และอ่านได้จาก linux ส่วนแบ่งสามารถมองเห็นได้จากเดสก์ท็อป Windows8 (64Bit) ของฉันโดยไม่มีชื่อผู้ใช้หรือรหัสผ่าน แต่ไม่มีอะไรในเครือข่ายรวมถึง W7 (64Bit) ของฉัน หุ้น

pi@SambaPi /var/log/samba $ uname -a
Linux SambaPi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux

fstab:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
/dev/sda1  /media/USBDRIVE  ntfs-3g rw,defaults,acl       0      0

cat /etc/samba/smb.conf | egrep -v '^ # | ^; | ^ $' (Samba config โดยไม่มีช่องว่างความคิดเห็นและเซมิโคลอนแปลก ๆ (เส้นเหล่านั้นคืออะไร)

[global]
   workgroup = WORKGROUP
   realm = raspberrypi
   netbios name = raspberrypi
   server string = %h server
   dns proxy = no
   name resolve order = lmhosts host wins bcast
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 10
   panic action = /usr/share/samba/panic-action %d
   security = SHARE
   encrypt passwords = true
   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
   socket options = TCP_NODELAY
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = yes
[USB]
   path = /media/USBDRIVE
   comment = Media Share
   writeable = yes
   browseable = yes
   guest ok = yes
   public = yes
   force user = root
   read only = no
   read only = yes
   create mask = 0775
   directory mask = 0775

getfacl / media / USBDRIVE

# file: USBDRIVE/
# owner: root
# group: root
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::r-x
default:other::r-x

getfacl /media/USBDRIVE/testFileMadeAtCommantLine.txt

# file: testFileMadeAtCommantLine.txt
# owner: root
# group: root
user::rwx
group::rwx
other::rwx

ฉันเคยผ่านบันทึกของระบบและไม่ได้เห็น สิ่งใด ที่สอดคล้องกับข้อความอนุญาตที่ฉันได้รับเมื่อฉันพยายามเพิ่มหรือลบไฟล์ในการแชร์

คำตอบ:


1

บังคับให้ผู้ใช้ การตั้งค่าไม่ได้หมายความว่าคุณไม่ต้องป้อนรหัสผ่าน จาก smb.conf:

ชื่อผู้ใช้นี้จะถูกใช้เมื่อการเชื่อมต่อเสร็จสิ้น ดังนั้น   ลูกค้ายังคงต้องเชื่อมต่อในฐานะผู้ใช้ที่ถูกต้องและจัดหาที่ถูกต้อง   รหัสผ่าน เมื่อเชื่อมต่อแล้วการดำเนินการไฟล์ทั้งหมดจะถูกดำเนินการเป็น   "บังคับผู้ใช้" ไม่ว่าชื่อผู้ใช้จะเชื่อมต่อกับลูกค้าแบบใดก็ตาม นี้   มีประโยชน์มาก

ระบุ บัญชีแขก ให้คุณค่าและให้สิทธิ์ผู้ใช้นี้ด้วย

นอกจากนี้คุณยังมี read only = yes และ read only = no ระบุในหุ้นเดียวกันหรือไม่ แก้ไขที่

คุณสามารถใช้ได้ testparm คำสั่งเพื่อตรวจสอบข้อผิดพลาด smb.conf และพิมพ์การกำหนดค่าแซมบ้า


0

เจนิส คำตอบของคุณช่วยฉันออกมาเป็นกอง และใช้งานได้ดี ฉันลบสิ่งที่คุณแนะนำเพิ่มสิ่งที่คุณแนะนำและเปลี่ยนการอนุญาตและความเป็นเจ้าของให้กับผู้ใช้ที่ "เหมือนแขก" config ของฉันตอนนี้ดูเหมือนว่า:

Pi มีเกมที่มีชื่อผู้ใช้ chown'd ไฟล์ทั้งหมดให้กับผู้ใช้และให้สิทธิ์ทั้งหมดกับเกม และเปลี่ยนการตั้งค่าตามที่คุณแนะนำ

ตอนนี้มันใช้งานได้ดีและ config ของฉันก็คือ:

[global]
   workgroup = WORKGROUP
   realm = raspberrypi
   netbios name = raspberrypi
   server string = %h server
   dns proxy = no
   name resolve order = lmhosts host wins bcast
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 10
   panic action = /usr/share/samba/panic-action %d
   security = SHARE
   encrypt passwords = true
   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
   socket options = TCP_NODELAY
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = yes
[USB]
   path = /media/USBDRIVE
   comment = Media Share
   writeable = yes
   browseable = yes
   guest ok = yes
   guest account = games
   public = yes
   read only = no
   create mask = 0775
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.