ubuntu1604搭建samba伺服器
ubuntu: 1604版本
sudo apt-get install samba
sudo apt-get install smbclient
修改samba配置,開放對使用者名稱訪問samba的許可權。
(1)備份配置,防止出錯。
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
(2)修改配置,增加使用者對samba訪問的許可權。
vi /etc/samba/smb.conf
找到「share definitions」**段,修改共享規則。
修改為如下
#********************=== share definitions ********************===
# un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. this will share each
# user's home directory as \\server\username
[homes]
comment = home directories
browseable = yes
# by default, the home directories are exported read-only. change the
# next parameter to
'no' if you want to be able to write to them.
read only = no
# file creation mask is set to
0700
for security reasons. if you want to
# create files with
group=rw permissions, set next parameter to
0775.
create mask = 0755
# directory creation mask is set to
0700
for security reasons. if you want to
# create dirs. with
group=rw permissions, set next parameter to
0775.
directory mask = 0755
# by default, \\server\username shares can be connected to by anyone
# with
access
to the samba server.
# un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# this might need tweaking when using external authentication schemes
valid users = %s
修改完成,儲存退出。
對於有些ubuntu,預設是啟用狀態,不支援samba服務,此時,輸入命令增加對samba的支援。
sudo ufw allow samba
輸入完成之後,檢查是否增加了對samba的支援。
sudo ufw status
結果顯示如下,可以看到samba則說明成功(如果顯示 status: inactive也可以)。
houfei@ubuntu:~$ sudo ufw status
status: active
to action from
– —— —-
22 allow anywhere
samba allow anywhere
8090 allow anywhere
22 (v6) allow anywhere (v6)
samba (v6) allow anywhere (v6)
8090 (v6) allow anywhere (v6)
sudo /etc/init.d/samba restart
例如,要增加乙個 test使用者,首先該使用者是ubuntu裡面的使用者,然後,再將該使用者增加至samba服務。
# 增加test使用者,使用者名為test
sudo adduser test
# 增加test使用者至samba伺服器
sudo smbpasswd -a test
Ubuntu16 04搭建redis集群
搭建這個集群花了我兩天,出了非常多非常多的問題!幸好的是搭成了!現在交代我的環境 redis 3.0.7.tar.gz ruby 2.3.4p301 redis 3.0.0.gem eclipse執行以來的jar包是 common pool 1.6.jar common pool2 2.4.2.ja...
基於ubuntu16 04搭建Devstack
第一步 devstack的第一次搭建最好是放在虛擬機器裡面,這樣出了問題比較容易解決。如果放在實體機裡面,重灌系統是真的麻煩。所以,首先講一講怎麼建立虛擬機器。所以,建立ubuntu16.04的虛擬機器是首要的,並能夠連線外網。如果不會建立虛擬機器,可以參考第一步下面的內容。這裡,建立虛擬機器的方法...
ubuntu16 04搭建gitlab伺服器
1.gitlab官網選擇gitlab安裝包,這裡選擇ubuntu。2.安裝配置必要的依賴關係。sudo apt get update sudo apt get install y curl openssh server ca certificates 3.安裝postfix,來傳送郵件,選擇inte...