Domanda

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

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.

È stato utile?

Soluzione

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.

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top