Ubuntu 14.04sudo apt-get install smbclient samba-common-bin system-config-sambasystem-config-samba # 打開一個GUI界面進行配置,很簡單的
但是呢,到了ubuntu 16.04 以後,就變得不是那麼簡單的了;ios
使用兩樣的命令,GUI界面會報錯的;ubuntu
root@Asgard:~# 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': No such file or directory
暫時不深究它怎麼解決這個問題錯誤,出現這個錯誤時彈出了Bug反饋,就點了一下發送~~,僅此而已;windows
如今呢,一是等待官方解決問題,二是本身還能夠經過修改配置文件的形式配置samba;
在此以前,得須要生成samba用戶名和密碼,以區別你的系統用戶名、密碼; spa
cat /etc/passwd | mksmbpasswd > /etc/samba/smbpasswdsmbpasswd -a scue # 輸入密碼,最好與登陸名密碼不一樣
配置文件在/etc/samba/smb.conf
,我在後邊添加了一段信息:debug
# scue home directory[scue] workgroup = scue security = scue netbios name = scue comment = scue home path = /home/scue browsable = yes writeable = yes read only = no
這個的意思是,共享目錄 /home/scue
,可讀可寫,用戶名是scue,基本信息也是最重要的信息是這些,其餘的能夠本身領悟;rest
通常狀況下,咱們會使用code
sudo service samba restart
但是呢,居然提示xml
Failed to start samba.service: Unit samba.service is masked.
後來想起來,16.04的服務是使用systemd進行管理了,查了一下相關的資料,發現重啓服務的命令以下blog
sudo systemctl restart smbd.service
OK,一切都搞定了~,看熟悉的界面又出來了。get