LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Connecting to Terminal Server 2012 with Freerdp, NLA Support and Raspberry Pi (https://www.linuxquestions.org/questions/linux-server-73/connecting-to-terminal-server-2012-with-freerdp-nla-support-and-raspberry-pi-4175627996/)

Seyssinet 04-19-2018 11:04 AM

Connecting to Terminal Server 2012 with Freerdp, NLA Support and Raspberry Pi
 
Hi,

We configured Raspberries to work as Thin Client to connect to a W2012 server with remote desktop protocol.

For this, we use xfreerdp as linux client which works like a charm (except sound on Rpi).

The problem is now we want to use the NLA: Network Level Authentication. So I actived it, and problems began

Xfreerdp supports it, no problem, but there is a strange behavior, or normal, you tell me :)

If I do :
Code:

xfreerdp /v:servername /u:username /sec:nla --no-tls
It askes for password at the 3rd time (error on the 2 first attemps) and it works, the connection is OK.

But if I do this, and that's needed because I use Zenity to prompt username and password, it doesn't work :
Code:

xfreerdp /v:servername /u:username /p:password /sec:nla --no-tls
I have the error:
Code:

Protocol Security Negotiation or connection failure
Do I have to encrypt the password or something for Windows to accept it ?

I don't know if I was clear enough, just ask me.

Thanks for your help,
Cyril

bgstack15 04-19-2018 12:55 PM

Alas, the details of NLA are beyond me. However, dealing with the parameters passed through the shell, is more in my realm. Passwords tend to contain non-alphanumeric characters. Can you make sure you're passing the variable in its entirety by using double quotes:
Code:

mypassword="$( zenity --prompt 'Enter password here' --and-more-options-im-sure )"
xfreerdp /v:servername /u:username /p:"${mypassword}" /sec:nla --no-tls

By putting the variable in double quotes, you can make sure the shell passes the whole thing to the application.

However, using parameters to hold secrets is insecure, and should be avoided. Any process can read the list of running processes ( ps -ef ) and list the parameters as well.


All times are GMT -5. The time now is 11:12 PM.