Tobias Glemser
2006-Feb-14 14:58 UTC
[Samba] smbclient -L misses some shares when using NULL-Sessions
List, while trying to list all shares in my network using smbclient I recognized that some shares are missing. ("hostname" is a Win2K Box). smbclient -L -U "" -N hostname shows no shares (using NULL-Session-Logon as you can see) if I use a windows box to connect to "hostname" using net use \\hostname "" /User:"" I can see all shares of this box in the explorer. On samba-based boxes, smblient seems to retrieve all shares. But don't blame it only on the Null-Session-Logon, also if I connect to the box using smbclient -L -U "Administrator" -N hostname I only get the admin-shares. Is there an option I missed on smbclient to also see the missing share? And, by the way, is there a way to retrieve the admin shares using NULL Session Logon like some w$nd0ws based audit tools? Thanks in advance! Toby
Tobias Glemser
2006-Feb-17 09:59 UTC
[Samba] smbclient -L misses some shares when using NULL-Sessions (SOLVED)
List, there seems to be a limitation to 12 chars in smbclient. If someone has the same problem: net rpc share list -S IP_target_system -U% is the solution. Toby Tobias Glemser wrote on 14.02.2006 15:50:> List, > > while trying to list all shares in my network using smbclient I > recognized that some shares are missing. ("hostname" is a Win2K Box). > > smbclient -L -U "" -N hostname > shows no shares (using NULL-Session-Logon as you can see) > > if I use a windows box to connect to "hostname" using > net use \\hostname "" /User:"" > I can see all shares of this box in the explorer. On samba-based boxes, > smblient seems to retrieve all shares. > > But don't blame it only on the Null-Session-Logon, also if I connect to > the box using > smbclient -L -U "Administrator" -N hostname > I only get the admin-shares. > > Is there an option I missed on smbclient to also see the missing share? > And, by the way, is there a way to retrieve the admin shares using NULL > Session Logon like some w$nd0ws based audit tools? > > Thanks in advance! > > Toby