# smbd && nmbd
or
# /etc/init.d/smb start
or
# service smb restart
firewall disabled
smb.conf
#======================= Global Settings =====================================
[global]
workgroup = whq
server string = BUILDROOT
max log size = 50
security = share
encrypt passwords = no
smb passwd file = /etc/samba/smbpasswd
log file = /var/log/samba/log.smbd
hosts allow =
#interfaces = eth0 192.168.0.1/255.255.255.0
#socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
#============================ Share Definitions ==============================
#idmap uid = 16777216-33554431
#idmap gid = 16777216-33554431
#template shell = /bin/false
#winbind use default domain = no
[data]
path = /
public = yes
writable = yes
printable = no
browsable = yes
force create mode = 0777
force directory mode = 0777
[data2]
path = /mnt/sdb1
public = yes
writable = yes
printable = no
browsable = yes
force create mode = 0777
force directory mode = 0777
#=============================
mount usb drive
如果mount usb裝置後無法存取,試用以下指令 (uid&pid 可能需要改動,看系統中的nobody uid值)
#mount -o auto,users,umask=000,dmask=000,fmask=000,uid=65534,gid=65534 ${part}
${path}