Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2919743
  • 博文数量: 454
  • 博客积分: 4860
  • 博客等级: 上校
  • 技术积分: 6375
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 10:08
个人简介

10年工作经验,专研网站运维。

文章分类

全部博文(454)

文章存档

2017年(11)

2016年(13)

2015年(47)

2014年(36)

2013年(147)

2012年(64)

2011年(136)

分类: 系统运维

2016-10-09 16:24:28

1. Client command:

List public SMB shares with

smbclient -L //server -U username

Connect to a SMB share with

smbclient //server/share -U username

2. Check configure file:
testparm

3. Create an account
addgroup smbgrp

useradd till -G smbgrp

smbpasswd -a till



4. Making a public folder for everybody,
everybody can own the folder.
[Public]
    path = /samba/public
    create mask = 0700
    read only = no
mkdir /samba/public
chmod -R 7777 ./public/
chown :smbgrp ./public/ -R

5. Making a team folder for sale department
leader account can write and read the folder, staff only can read the folder.

addgroup salegroup
useradd -g salegroup staff
smbpasswd -a staff
useradd  -G salegroup leader
smbpasswd -a leader
mkdir -p /samba/saleteam
chown -R leader:salegroup ./saleteam
chmod -R 750 saleteam

vim /etc/samba/smb.conf
[Sales team]
 path = /samba/secured
 guest ok = no
 writable = yes
 browsable = yes
save and quit;
service smbd restart
阅读(1143) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~