创建Linux用户


# 创建用户组
groupadd <userGropName> -g 6000 

# 创建用户并禁止使用shell
useradd <userName> -u 6000 -g 6000 -s /sbin/nologin -d /dev/null

# 创建备份目录
mkdir /home/<pathName>

# 设置权限
chown -R <userName>:<userGropName> /home/<pathName>

# 禁止其他人访问
chmod u+rwx,g+rwx,o-rwx /home/<pathName>

# 设置密码
passwd <userName>

安装并配置samba


# 安装
apt-get install samba

# 备份 smb.conf

cp /etc/samba/smb.conf  /etc/samba/smb.conf.bak

# 编辑配置
vim /etc/s

配置文件如下

[work]
    comment = samba home directory 
    path = /home/user/
    public = yes
    browseable = yes
    public = yes
    read only = no
    valid users = user
    create mask = 0777
    directory mask = 0777 
    force user = nobody
    force group = nogroup
    available = yes
# 增加samba用户
smbpasswd -a <userName>

# 设置密码

# 重新启动samba

service smbd restart

连接

打开访达 app,使用快捷键 ⌘Command+K 来连接到服务器,填入 NAS 对应的 SMB 地址,

参考文档

Ubuntu 16.04安装配置Samba服务

低增加samba用户提示Failed to add entry for user

标签: linux, mac, apple, 时间机器

已有 4 条评论

  1. 真好呢

  2. 《征服北极》记录片高清在线免费观看:https://www.jgz518.com/xingkong/166081.html

  3. 作者以非凡的视角解读平凡,让文字焕发出别样的光彩。

  4. 理论深度可再挖掘,以提升文章厚重感。

添加新评论