ubuntu16.04下安装samba

1、安装 samba软件包

       sudo apt-get install samba

       sudo apt-get install smbclient


2、启动或停止samba服务

       sudo /etc/init.d/samba start

      sudo /etc/init.d/samba stop


3、安装samba管理工具

       sudo apt-get install system-config-samba

4、启动samba管理工具

      sudo system-config-samba


     注:启动过程中可能会出现以下的错误:

Traceback (most recent call last):
  File "/usr/sbin/system-config-samba", line 45, in <module>
    mainWindow.MainWindow(debug_flag)
  File "/usr/share/system-config-samba/mainWindow.py", line 121, in __init__
    self.basic_preferences_win = basicPreferencesWin.BasicPreferencesWin(self, self.xml, self.samba_data, self.samba_backend, self.main_window)
  File "/usr/share/system-config-samba/basicPreferencesWin.py", line 97, in __init__
    self.admin = libuser.admin()
SystemError: could not open configuration file `/etc/libuser.conf': 没有那个文件或目录

   

     解决方法 :手动创建libuser.conf文件

      sudo touch /etc/libuser.conf


5、在启动后的界面上 "首先项"-->samba用户,添加samba用户。里边的unix用户是指当前ubuntu中存在的用户名, windows用户名和密码是从windows下访问时要用到的用户名和密码.

6 在启动后的界面上点“+”号,添加一个新的共享。在“基本”选项卡中,选中要共享的目录后,勾上“可擦写” "显示";在“访问”选项卡里,把上一步添加的用户选上。


7、修改共享目录的权限,为所有人可读写。

8 重启samba服务.

9、在windows下的资源管理器中输入linux的IP地址,如 \\192.168.216.186 ,弹出一个登录的对话框,在弹出的框里输入刚设置windows用户名和密码。


samba安装完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值