Bug 6473 - "net rap session" cannot get username
"net rap session" cannot get username
Status: RESOLVED DUPLICATE of bug 8009
Product: Samba 3.3
Classification: Unclassified
Component: Client tools
3.3.4
x86 Linux
: P3 minor
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-14 08:35 UTC by TAKAHASHI Motonobu
Modified: 2011-03-17 15:15 UTC (History)
1 user (show)

See Also:


Attachments
Level10 log. (3.43 KB, application/octet-stream)
2009-06-14 08:37 UTC, TAKAHASHI Motonobu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description TAKAHASHI Motonobu 2009-06-14 08:35:22 UTC
"net rap session" cannot get username and client type:

-----
# /usr/local/samba/bin/net -s /tmp/ja.conf -U administrator%password -S 192.168.135.1 rap session
Computer             User name            Client Type        Opens Idle time
------------------------------------------------------------------------------
\\192.168.135.31                                                 0 00:03:41
Comment 1 TAKAHASHI Motonobu 2009-06-14 08:37:13 UTC
Created attachment 4284 [details]
Level10 log.
Comment 2 TAKAHASHI Motonobu 2009-06-14 08:55:06 UTC
Sorry, I recognize this is an expected behavior but meets another problem: "net rap session" displays nothing:

-----
# /usr/local/samba/bin/net -s /tmp/aa.conf -U administrator%password -S 192.168.135.1 rap session
Computer             User name            Client Type        Opens Idle time
------------------------------------------------------------------------------
\\192.168.135.71                          ADMINISTRATOR          3 00:03:49
\\                                                               0 561159:50:45
# /usr/local/samba/bin/net -s /tmp/aa.conf -U administrator%password -S 192.168.135.1 rap session info \\192.168.135.71
Share name     Type     # Opens
------------------------------------------------------------------------------

Expected display is:
-----
-----
$ net -U Administrator%password -I 192.168.135.33 session info \\\\megu
User name       Administrator
Computer        MEGU
Guest logon     no
Client Type     Unix
Sess time       00:00:55
Idle time       00:00:05
Share name     Type     # Opens
------------------------------------------------------------------------------
TEMP           Disk         0
IPC$           IPC          0
-----
Comment 3 Guenther Deschner 2011-03-17 14:27:19 UTC
Should work in master, 3.6 and recent 3.5 trees now. Please check.

*** This bug has been marked as a duplicate of bug 8009 ***
Comment 4 TAKAHASHI Motonobu 2011-03-17 15:15:27 UTC
(In reply to comment #3)
> Should work in master, 3.6 and recent 3.5 trees now. Please check.
> 
> *** This bug has been marked as a duplicate of bug 8009 ***

I examined with Samba 3.5.8 + the patch for BUG#8009.
Though "net rap session" now can get username, the output is still wrong.

To examine, I create a simple share and put a MS-Word file and open it.

The output of smbstatus seems good:

==========
# smbstatus

Samba version 3.5.8
PID     Username      Group         Machine
-------------------------------------------------------------------
15685     monyo         users         mizuka       (::ffff:192.168.135.1)

Service      pid     machine       Connected at
-------------------------------------------------------
monyo        15685   mizuka        Thu Mar 17 23:58:41 2011
IPC$         15685   mizuka        Thu Mar 17 23:58:44 2011
IPC$         15685   mizuka        Fri Mar 18 00:05:20 2011

Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
15685        1000       DENY_WRITE 0x2019f     RDWR       NONE             /home/monyo   tmp/test.doc   Fri Mar 18 00:05:20 2011
==========

The word file is opened and locked.

But the output of "net rap session" displays 0 files are opened, although the username is correctly set:

==========
# net -U root%password -S localhost rap session
Computer             User name            Client Type        Opens Idle time
------------------------------------------------------------------------------
\\mizuka             monyo                Unknown Client         0 00:00:00
\\lenny5             root                 Unknown Client         0 00:00:00
==========

And "net rap session info" returns nothing:

==========
# net -U root%password -S localhost rap session info \\\\mizuka
Share name     Type     # Opens
------------------------------------------------------------------------------
==========

I will create a new bug: Bug#8023 - "net rap session" does not return correct messages