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
 
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]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no  www.2cto.com  
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
 
[homes]
comment = home
valid user = %S
writable=yes
browseable=no
create mode = 0664
directory mode = 0775
  www.2cto.com  
[A]
path=/home/A
available=yes
browseable=yes
public=no
alid user = A
writable=yes
 
[B]
path=/home/B
available=yes
browseable=yes
public=no
alid user = B
writable=yes
 
4,添加samba用户和设置密码。
 
   sudo smbpasswd  -a  A   会提示输入密码,输入两次ok,会同时建立samba用户和密码
   sudo smbpasswd  -a  B
 
5、保存配置,重启samba服务   sudo /etc/samba/smbd restart
 
注意:有时候你输入用户和密码后会提示:
                不允许一个用户使用一个以上用户名与一个服务器或共享资源的多重连接。中断与此服务器或共享资源的连接,然后在试一次...
                                 请在windows 下面,执行如下命令:运行-》cmd -》net   use   *   /del   /y

ubuntu samba服务器多用户配置【转】的更多相关文章

  1. Ubuntu 18.04安装Samba服务器及配置

    Ubuntu 18.04安装Samba服务器及配置 局域网下使用samba服务在Linux系统与Windows系统直接共享文件是一项很方便的操作.以Ubuntu为例配置samba服务,Linux服务器 ...

  2. [亲测]ASP.NET Core 2.0怎么发布/部署到Ubuntu Linux服务器并配置Nginx反向代理实现域名访问

    前言 ASP.NET Core 2.0 怎么发布到Ubuntu服务器?又如何在服务器上配置使用ASP.NET Core网站绑定到指定的域名,让外网用户可以访问呢? 步骤 第1步:准备工作 一台Liun ...

  3. linux中Samba服务器的配置

    Samba简介 Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件 ...

  4. [亲测]七步学会ASP.NET Core 2.0怎么发布/部署到Ubuntu Linux服务器并配置Nginx反向代理实现域名访问

    前言 ASP.NET Core 2.0 怎么发布到Ubuntu服务器?又如何在服务器上配置使用ASP.NET Core网站绑定到指定的域名,让外网用户可以访问呢? 步骤 第1步:准备工作 一台Liun ...

  5. 【转】 Ubuntu samba服务器搭建及测试--不错

    原文网址:http://blog.csdn.net/longfeey/article/details/5937968 Ubuntu samba服务配置是很不错的文件应用很有学习价值, 这里我主要讲解U ...

  6. Samba服务器的配置与使用

    1.系统环境变量 Fedora: yum install libacl-devel libblkid-devel gnutls-devel \ readline-devel python-devel ...

  7. ubuntu samba 服务器搭建

    最近总是在搭建 samba 环境,写在笔记上记录下以备后用,长时间不操作了肯定会忘记. Linux 版本:Ubuntu 18.04 具体的操作命令: 1. 安装: sudo apt-get insta ...

  8. Samba服务器搭建配置

    本次环境: 服务端-centos6.8-192.168.2.200 客户端1-centos6.8-192.168.2.201 客户端2-Windows7-192.168.2.104 假设条件如下: 使 ...

  9. samba服务器详细配置(非域模式)

    组成Samba运行的有两个服务,一个是SMB,另一个是NMB:SMB是Samba 的核心启动服务,主要负责建立Samba服务器与Samba客户机之间的对话,验证用户身份并提供对文件和打印系统的访问,只 ...

随机推荐

  1. HDU 5693 D Game 区间dp

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5693 题解: 一种朴实的想法是枚举选择可以删除的两个或三个数(其他的大于三的数都能凑成2和3的和), ...

  2. hibernate---CRUD

    delete @Test public void testDelete() { Teacher t = new Teacher(); t.setName("t1"); t.setT ...

  3. 设计模式之观察者模式(Observer)

    观察者模式原理:当有新的消息产生时发送给观察者,和中介者模式的不同地方是中介者模式强调中介的作用以及中介双方的交互,观察者模式是主动调用观察者成员函数进行消息发送. 代码如下: #include &l ...

  4. poj 3264 Balanced Lineup 区间极值RMQ

    题目链接:http://poj.org/problem?id=3264 For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) alw ...

  5. Win32 Plus Extra Height of Caption Bar

    you set the size of the non-client area by handling the WM_NCCALCSIZE message. But don't do this unl ...

  6. xp/2003开关3389指令

    开启3389: @echo offtitle 开启3389clsrem 开启3389reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ ...

  7. 利用sublime的snippet功能快速创建代码段

    在前端开发中我们经常会输入相同的一些基本代码,例如常用的jquery引用,bootstrap框架,cssreset等等,如果每次使用时在复制粘贴感觉很麻烦,这里介绍一种更为简洁的方法 利用sublim ...

  8. racle 11g impdp时 报ORA-12899

    racle 11g impdp时 报ORA-12899 (2012-07-16 16:42:12) 转载▼ 标签: oracle imp impdp it 分类: oracle技术-开发 源库ZHS1 ...

  9. **app后端设计(10)--数据增量更新(省流量)

    在新浪微博的app中,从别的页面进入主页,在没有网络的情况下,首页中的已经收到的微博还是能显示的,这显然是把相关的数据存储在app本地. 使用数据的app本地存储,能减少网络的流量,同时极大提高了用户 ...

  10. 《JavaScript基础教程(第8版)》PDF

    简介:JavaScript基础教程(第8版)循序渐进地讲述了JavaScript及相关的CSS.DOM.Ajax.jQuery等技术.书中从JavaScript语言基础开始,分别讨论了图像.框架.浏览 ...