【发布时间】:2016-11-13 03:52:24
【问题描述】:
有没有办法创建虚拟用户(例如,没有 Solaris 用户的用户),以便我可以设置 ZFS samba 共享的权限并使用这些凭据连接到它?
【问题讨论】:
有没有办法创建虚拟用户(例如,没有 Solaris 用户的用户),以便我可以设置 ZFS samba 共享的权限并使用这些凭据连接到它?
【问题讨论】:
我不知道有什么办法。
文件和目录需要以某种方式存储,以识别拥有它们的用户是谁,或者哪些用户需要访问它们的权限。对于在 Solaris 服务器上运行的 ZFS 文件系统,直接或间接通过 uid,这意味着必须存在用户帐户才能将其映射到任何类似 SAMBA 凭据的东西。
请注意,entire Solaris VFS structure 依赖于每个具有 uid 的元素:
typedef struct vattr {
uint_t va_mask; /* bit-mask of attributes */
vtype_t va_type; /* vnode type (for create) */
mode_t va_mode; /* file access mode */
uid_t va_uid; /* owner user id */
gid_t va_gid; /* owner group id */
dev_t va_fsid; /* file system id (dev for now) */
u_longlong_t va_nodeid; /* node id */
nlink_t va_nlink; /* number of references to file */
u_offset_t va_size; /* file size in bytes */
timestruc_t va_atime; /* time of last access */
timestruc_t va_mtime; /* time of last modification */
timestruc_t va_ctime; /* time of last status change */
dev_t va_rdev; /* device the file represents */
uint_t va_blksize; /* fundamental block size */
u_longlong_t va_nblocks; /* # of blocks allocated */
uint_t va_seq; /* sequence number */
} vattr_t;
并且使用 ACL 不会消除对 uid 的需求,因为 ZFS ACL 最终归结为实体的数字 ID。查看源代码http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/zfs/sys/zfs_acl.h#48
【讨论】: