Chinaunix首页 | 论坛 | 博客
  • 博客访问: 650622
  • 博文数量: 109
  • 博客积分: 6081
  • 博客等级: 准将
  • 技术积分: 1318
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-24 10:28
文章分类
文章存档

2011年(8)

2010年(39)

2009年(62)

分类: 服务器与存储

2009-11-07 22:32:36

                      the third day
------------------------------------------------------------------------------------------------------------------
CIFS(common internet  file system)通用因特网文件系统
微软的windows中应用
before you can request resource from a server ,these function are required:
* user authentication : 开始会话之前的认证,这样可以访问server
*user authentication :permission to access to share
认证: 1、本地认证 基于 workgroup
       2、域控制器认证
********license cifs **********
#license add license_code
或 在filerview中 filer 菜单下有
#cifs setup 在这之前应该先停止cifs   #cifs terminate
。。。。Hiden share:看不见的,以$ 结束的
。。。。admin share: 只允许管理组 administrator组的成员访问
默认创建的几个共享:
C$    hiden admin 共享根目录
ETC$  hiden admin 共享/etc目录
home  all can control 共享 /home
#cifs shares  查看当前共享
#cifs shares -add sharename  path  -comment decriptions    sharename: 访问时的名字   path格式: /vol/vol2    -comment 可以不指定,此时为空
#cifs shares -delete sharename
#options cifs.enable_share_browsing [on | off] 目录是否可见
#useradmin user list  查看用户,看那些用户有权登陆cifs,这种认证适用于 windows workgroup。
#qtree security /vol/vol2 ntfs  
非windows workgroup 访问的认证,在/etc/passwd ,/etc/group下认证
在windows 下,运行:
在windows 下停止,cifs访问: 运行 cmd
#net use  查看当前网络使用
#net use /delete *   删除当前网络使用,再次运行时,会提示输入用户名和密码
ONTAP下修改用户密码:
#passwd
#cifs access sharename user  right 权限的控制
#cifs access -delete sharename right  删除相关的权限
#cifs sessions 查看连接信息
#cifs terminate  停止cifs服务
CIFS认证的三步:
1、连接时,根据是否是workgroup 或 Domain 采用那种认证,允许登陆。
2、share 权限的认证,exportfs 出去的权限,也就是共享的权限
3、检查文件的属性,是否可以 rwx ,或可读,可写。。。,这里需要usermapping
在options walf.default 中可以看到默认的 mapping user 为 pcuser ,假如上面的文件为空,则采用默认的 pcuser
默认值在:
#options wafl 中。
wafl.default_nt_user                   
wafl.default_qtree_mode      0777      
wafl.default_security_style  unix      
wafl.default_unix_user       pcuser    
wafl.group_cp                off       
wafl.inconsistent.buf_limit  10        
wafl.inconsistent.ino_limit  5         
wafl.inconsistent.snap_limit 5         
wafl.maxdirsize              1310      
wafl.nt_admin_priv_map_to_root on        
wafl.root_only_chown         on        
wafl.wcc_minutes_valid       20   
    
NFS  ---- 编辑文件
 /etc/exports
或命令 exportfs
exports格式:
/vol/vol0/pubs  -rw=host1:host2,root=host1
/vol/vol0/pubs  -rw=host1:host2:-host3,root=host1      -host3:代表排除host3,也可以定义网络组。。
/vol/vol0/home  -rw=host1:host2,ro
--------------------------------------------------------------------------
root=host1  host1挂载时,分配文件的权限是 owner,UID 为 0  ,
ro          采用默认的 UID=65534   
rw          同上
anon=UID    挂载的所有主机分配给root用户的 UID
 
网络组格式:
-rw=子网/子网位数

-rw=netgroup
#exportfs -a    从新加载 /etc/exports的内容
#exportfs -r    把内存清空,再重新加载
#exportfs      列出内存中的输出规则
#exportfs -u  path          取消当前路径输出
#exportfs -i  -o  rw  /vol/vol1       i :忽略当前的内存中规则,只启用本规则   ,-o  option 读写权限 
#exportfs -p                             persistent,可以写到文件中并能生效
#exportfs -z path         内存中取消,并在文件中注释掉
#options nfs.auto-update 默认on ,建议关闭 off
#vol create vol3 aggr1 30m
#exportfs
#rdfile /etc/exports
可以看到内存和文件都有这个规则。
flex volume 在整个系统的数量限制是 500个

qtree :
vol1:是 ntfs(ACL) or unix(rwxrwxrwx) UDI GID 认证时,不同的系统访问会出现问题 windows只能访问 ntfs ,访问不了 unix 的vol
qtree 就是目录树,它有一些属性: 对于一个新建的vol 默认的权限是 777 root:root ,修改的应该在options wafl 中。
#qtree  查看vol的style
#qtree security path [ ntfs | unix ]  把vol的style改为 :ntfs(cifs) or unix(nfs)
#options wafl.default_security_style  value    value:为 unix 或 ntfs
#qtree security /vol/vol2 ntfs     把一个vol的tyle改为 ntfs
也可以做 usermapping,在文件:/etc/usermap.cfg
NTuser => unixuser
NTuser <= unixuser
增加
#cifs passwd admin123    密码加密,用于给用户添加密码
#cifs sessions  可以看到用户是unix用户

-----------------------------------------------------------------------------------------------
阅读(5444) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~