请稍侯

添加新用户与smb用户

31 October 2016
更多

添加开发机账号

  • 1、sudo groupadd add your-name
  • 2、useradd -g your-name -d /home/your-name -s /bin/bash your-name
  • 3、sudo mkdir /data/www/your-name
  • 4、sudo chown your-name:your-name
  • 5、cd /home/your-name
  • 6、ln -s /data/www/your-name www

添加smb账号

  • 1、sudo vi /etc/samba/smb.conf
  • 2、找到下面这段添加你的名字
[share]
        comment = doc share
        path = /data/samba
        ;public = yes
        ;read only = no
        ;browseable = yes
        browseable = yes

        ;guest ok = yes
        writable = yes
        ;read list = guest
        ;write list = guest

        valid users = lane yifan zhengxiang longming yanglie luwen idea xiaogui shanshan alibabayun wuyi caisongshu your-name
        #printable = yes
        ;valid users = %S
;       share modes = no
  • 3、sudo smbpasswd your-name #修改smb账号

  • 4、sudo /etc/init.d/smb restart #重启smb服务