[PATCH] Add '--resolve-uids' option to smbstatus

Andreas Schneider asn at samba.org
Mon Feb 18 19:12:31 UTC 2019

On Monday, February 18, 2019 7:28:44 PM CET Andrew Bartlett wrote:
> On Mon, 2019-02-18 at 17:18 +0100, Andreas Schneider via samba-
> technical wrote:
> > Hi,
> > 
> > I got a request to add an option to resolve uids into usernames for
> > 'smbstatus 
> > -L' the attached patch adds an option to do so.
> > 
> > The attached patch implements that.
> > 
> > 
> > Review much appreciated.
> Shouldn't we have a test to at least ensure it doesn't core, but
> ideally that it works?

We don't have a test for smbstatus at all. Nobody ever added one.

Also I think for locking with smbclient (which only works with NT1), we would 
need something like a sleep command in smbclient so that you can execute 
commands in the background like:

posix_open file
lock file
sleep 10

If someone implements the functionality in smbclient, we could write such 
tests ...

I've just run it manually with an interactive smbclient in the background.

Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           
SharePath   Name   Time
31109        asn             DENY_NONE  0x19b       RDWR       NONE             
/home/asn/workspace/projects/samba/st/fileserver/share   lower-case/20000   
Mon Feb 18 20:03:53 2019


Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

More information about the samba-technical mailing list