# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /usr/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
添加用户名为Ubuntu的账户,
/usr/local/samba-4.1.14$ sudo bin/smbpasswd -a ubuntu
New SMB password:
Retype new SMB password:
samba服务器的用户是依赖于linux的用户,只能添加linux中已存在的用户,否则会出现如下错误:
/usr/local/samba-4.1.14$ sudo bin/smbpasswd -a user1
New SMB password:
Retype new SMB password:
Failed to add entry for user user1.
启动samba 服务
/usr/local/samba-4.1.14$ sudo sbin/nmbd
/usr/local/samba-4.1.14$ sudo sbin/smbd
在Windwos文件管理器或直接win+R,输入server ip,可以看到如下界面: