ubuntu samba 服务器多用户配置
在/home/下有多个用户目录 A、B...,现通过 samba 共享,要求 A 用户对 A 用户组目录具有
root 权限,对其他目录具有
读权限,B 用户对 B 目录具有 root 权限,对其他目录只读。并在登陆各个目录时要求输入
samba 用户名和密码。已在 10.04 上通过。
www.2cto.com
1、安装 samba
sudo apt-get install samba
sudo apt-get install smbfs
sudo apt-get install samba smbfs samba-common smbclient
sudo apt-get install ssh
sudo apt-get install openssh-server
备份: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
编辑:sudo vim /etc/samba/smb.conf
2、添加系统用户 sudo adduser A
sudo adduser B
sudo adduser xx (用户名) <注意不要用 sudo uaeradd xx
sudo adduser xx
Adding user `xx' ...
Adding new group `xx' (1008) ...
Adding new user `xx' (1008) with group `xx' ...
Creating home directory `/home/xx' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 输入该用户的登陆密码
Retype new UNIX password: 确认密码
passwd: password updated successfully
Changing the user information for dengyx
Enter the new value, or press ENTER for the default
Full Name []: 回车
Room Number []: 回车
Work Phone []: 回车
Home Phone []: 回车
Other []: 回车
Is the information correct? [Y/n] y
执行完之后会在/home/目录下创建用户组,用户和相应用户目录。
3、修改/etc/samba/smb.cof
[global]
评论0