Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At work, I have access to a "virtual" Windows server terminal, which I can access through my Ubuntu Linux via tsclient or rdesktop.

Additionally, there are printer shares on this network, which can be accessed from any Windows PC on the network (including the "virtual" terminals); lets say the address is \\printshares.company.com.

Now, I open \\printshares.company.com in the "virtual" terminal in rdesktop (avoiding tsclient since it has a Bug #94743 in tsclient (Ubuntu): “Terminal Server Client isn't able to copy to/from clipboard”) - and I can see all printers fine..

However, when I'm on my Linux machine directly on the work network, I try and do something like:

$ ping printshares.company.com
PING printshares.company.com (192.168.0.200) 56(84) bytes of data.
^C64 bytes from 192.168.0.200: icmp_req=1 ttl=124 time=10.4 ms

--- printshares.company.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 10.450/10.450/10.450/0.000 ms


$ smbclient -L \\printshares.company.com -U MYUSERNAME
Enter MYUSERNAME's password: 
session setup failed: NT_STATUS_LOGON_FAILURE

Although the server cannot be pinged - at least the ping command tells me printshares.company.com can resolve to an IP (obviously, I replaced the real IP with a local one; but otherwise the ping response is left); however, as it can be seen, I am getting NT_STATUS_LOGON_FAILURE...

Now, there could be many things wrong here - all those Windows workgroups and such could be wrong etc..

Is it possible to retrieve the - let's call them "connection settings" - from the Windows terminal session, so I could replicate them under Linux when running smbclient?

(Needless to say, the IT department running these Windows servers is quite irritated by people using Linux; and will offer no support to those kinds of "customers". Furthermore, if obtaining those settings requires some installation on the client session, won't help me much, since I don't have permissions to install anything on the Windows terminal session. Still, I'd like to know if there is any kind of solution for this)...

share|improve this question
    
Try enabling client ntlmv2 auth in /etc/samba/smb.conf. –  grawity Aug 22 '11 at 14:27
    
Thanks for that @grawity - for that line, I get: "params.c:Parameter() - Ignoring badly formed line in configuration file: client ntlmv2 auth"; From Samba and NTLMv2 Authentication I got: "client ntlmv2 auth = Yes" which seemingly did pass, but still getting "NT_STATUS_LOGON_FAILURE".. I'm trying to run now smbclient -d5 ..., and from that debug dump log, only thing new I can see is "SPNEGO login failed: Logon failure"... which still doesn't tell me much... Thanks again - Cheers! –  sdaau Aug 22 '11 at 14:41
add comment

1 Answer

up vote 2 down vote accepted

It might be worth trying with -W DOMAINNAME as well.

share|improve this answer
    
Yippie - thank you @Col, that is awesome - FINALLY LISTING PRINT SHARES :) And for posterity, my full cmdline is now: smbclient -L \\printshares.company.com -U MYUSERNAME -W mydept.company.com ; and also this works too: smbclient -L \\printshares.company.com -U [email protected] -W mydept.company.com .... Many, many thanks again - cheers! EDIT: this also includes suggesiont by @gravity in smb.conf; there also I have: "security=domain" too. Cheers! –  sdaau Aug 22 '11 at 14:46
1  
@sdaau: security is a smbd server option and is ignored by smbclient. –  grawity Aug 22 '11 at 19:48
    
Many thanks @grawity - I wasn't aware of that; cheers! –  sdaau Aug 22 '11 at 19:53
    
@sdaau That's no problem, I'm glad I could help. –  Col Aug 22 '11 at 20:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.