如何在samba中获取用户的域信息 [英] how to get the user's domain information in samba

查看:84
本文介绍了如何在samba中获取用户的域信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BG:我已经在redhat linux中构建了samba,并共享了一个文件夹,然后从Windows访问共享文件夹.

BG:I have build samba in redhat linux, and share a folder, then access the share folder from windows.

如下所示,可以通过命令"smbstatus"获取连接信息

As the following shows, the connection information can be got via command "smbstatus"

[root@Redhat6 pam.d]# smbstatus

Samba version 3.5.10-125.el6
PID     Username      Group         Machine                        
-------------------------------------------------------------------
8303      leon          domain users  win0832mc    (::ffff:10.204.176.73)

我们可以获取用户,域组,然后如何获取域信息?能请你帮我吗?谢谢.

we can get the user, the group of domain, then how to get the domain information? Could please you help me on this? thanks.

推荐答案

smbstatus显示的用户名是本地用户的名称,而不是连接到共享的用户的名称.原始名称可能已经借助smb.conf中的用户名映射"选项进行了转换.

User name shown by smbstatus is the name of the local user, not the user which connected to the share. The original name might have already been transformed with the help of 'username map' option in smb.conf.

假设您在传入用户和本地POSIX用户之间具有一对一的名称映射.在这种情况下,您可以使用'wbinfo --uid-to-sid leon'获取用户'leon'的安全标识符(SID),然后下一步,执行'wbinfo --sid-to-fullname sid'来转换SID到完全限定的用户名(DOMAIN \ user).

Supposedly, you have one-to-one name mapping between incoming users and local POSIX users. In this case you can use 'wbinfo --uid-to-sid leon' to get Security Identifier (SID) of the user 'leon', and as next step do 'wbinfo --sid-to-fullname sid' to convert SID to fully qualified user name (DOMAIN\user).

这篇关于如何在samba中获取用户的域信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆