Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
807 stars 187 forks source link

Connection problem with FreeRDP and 2016 RDP server #305

Closed AlexandrSpb closed 5 years ago

AlexandrSpb commented 6 years ago

Hello. I have TS 5.6 Stable with latest updates (May 2018). I have a problem with FreeRDP. I have build TS with default config for FreeRDP from /biuld/conf/freerdp directory. I have comment some useless for me lines from this file - thinstation.conf.buildtime:

#FREERDP_SELECT_SERVER=true
#FREERDP_SERVER_0="1 Laptop"
#FREERDP_SERVER_0_OPTIONS="-sec-nla"
#FREERDP_KNOWN_HOST_0="Laptop 7a:a4:af:8a:98:da:50:52:ba:33:8d:e6:15:4e:49:7b:b3:f4:27:e6"
#FREERDP_SERVER_1="2 HTPC"
#FREERDP_SERVER_1_OPTIONS="-sec-nla"

LOG_COMMANDS=true

SESSION_0_TYPE=freerdp
SESSION_0_AUTOSTART=on

NO_SESSION="poweroff"

AUDIO_LEVEL=90
MIC_LEVEL=0

NET_USE=BOTH
NET_USE_DHCP=on
NET_HOSTNAME=ts_*

TIME_ZONE=America/Los_Angeles

BIND_MOUNT0="home:/root"
BIND_MOUNT1="boot:/boot"
BIND_MOUNT2="tsdev:/thinstation"
USB_STORAGE_SYNC=on
ALWAYS_ENTER_SERVER=true
ALLOW_SERVER_EDITS=false
GATEWAY_CREDENTIALS=true

Here is my test client file - thinstation.conf-000c29d34a1c:

SESSION_0_AUTOSTART=ON
SESSION_0_TYPE=freerdp
SESSION_0_TITLE="RDP"
SESSION_0_FREERDP_SERVER="192.168.10.74"
RECONNECT_PROMPT=FORCE
NET_TIME_SERVER="192.168.10.22"
TIME_ZONE="Europe/Moscow"
SESSION_0_FREERDP_OPTIONS="/u:mehadmin /p:super_pass /d:mehanika /v:srv-um"

After booting TS image on it i Have seen FreeRDP credentials with 2 tabs: user and server. Auto connection is not working. When I make changes to all tabs I only see prompt with Reconnect Yes/No. How can I resolve it?

Regards, Alexandr

Doncuppjr commented 6 years ago

Username have spaces in it?

Sent from Yahoo Mail for iPhone

On Thursday, May 17, 2018, 5:56 AM, AlexandrSpb notifications@github.com wrote:

Hello. I have TS 5.6 Stable with latest updates (May 2018). I have a problem with FreeRDP. I have build TS with default config for FreeRDP from /biuld/conf/freerdp directory. I have comment some useless for me lines from this file - thinstation.conf.buildtime:

FREERDP_SELECT_SERVER=true

FREERDP_SERVER_0="1 Laptop"

FREERDP_SERVER_0_OPTIONS="-sec-nla"

FREERDP_KNOWN_HOST_0="Laptop 7a:a4:af:8a:98:da:50:52:ba:33:8d:e6:15:4e:49:7b:b3:f4:27:e6"

FREERDP_SERVER_1="2 HTPC"

FREERDP_SERVER_1_OPTIONS="-sec-nla"

LOG_COMMANDS=true

SESSION_0_TYPE=freerdp SESSION_0_AUTOSTART=on

NO_SESSION="poweroff"

AUDIO_LEVEL=90 MIC_LEVEL=0

NET_USE=BOTH NET_USE_DHCP=on NETHOSTNAME=ts*

TIME_ZONE=America/Los_Angeles

BIND_MOUNT0="home:/root" BIND_MOUNT1="boot:/boot" BIND_MOUNT2="tsdev:/thinstation" USB_STORAGE_SYNC=on ALWAYS_ENTER_SERVER=true ALLOW_SERVER_EDITS=false GATEWAY_CREDENTIALS=true

Here is my test client file - thinstation.conf-000c29d34a1c: SESSION_0_AUTOSTART=ON SESSION_0_TYPE=freerdp SESSION_0_TITLE="RDP" SESSION_0_FREERDP_SERVER="192.168.10.74" RECONNECT_PROMPT=FORCE NET_TIME_SERVER="192.168.10.22" TIME_ZONE="Europe/Moscow" SESSION_0_FREERDP_OPTIONS="/u:mehadmin /p:super_pass /d:mehanika /v:srv-um"

After booting TS image on it i Have seen FreeRDP credentials with 2 tabs: user and server. Auto connection is not working. When I make changes to all tabs I only see prompt with Reconnect Yes/No. How can I resolve it?

Regards, Alexandr

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AlexandrSpb commented 6 years ago

Where spaces? As you can see in thinstation.conf-000c29d34a1c username without spaces.

Doncuppjr commented 6 years ago

Remove /etc/cmd/freerdp.{getuser,getpass}

Sent from Yahoo Mail for iPhone

On Thursday, May 17, 2018, 6:01 AM, AlexandrSpb notifications@github.com wrote:

Where spaces? As you can see in thinstation.conf-000c29d34a1c username without spaces.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

AlexandrSpb commented 6 years ago

I can`t find it :)

[root@centos etc]# ls
acpi                         fonts                  mime.types      prt-get.conf         strongswan.d
adjtime                      foomatic               mke2fs.conf     rc                   stunnel
airoscript-ng_advanced.conf  fstab                  modprobe.d      rc.conf              sudoers
airoscript-ng.conf           gconf                  modules-load.d  rc.d                 sudoers.d
airoscript-ng_debug.conf     gnome-settings-daemon  mono            rc.fix               swanctl
apache                       group                  motd            rc_keymaps           sysconfig
autofs                       group-                 mplayer         rc.local             sysctl.conf
autofs_ldap_auth.conf        gssapi_mech.conf       mtab            rc_maps.cfg          sysctl.d
auto.master                  host.conf              my.cnf          rc.modules           syslog.conf
auto.misc                    hosts                  nas             rc.multi             systemd
auto.net                     hosts.allow            netconfig       rc.shutdown          tmpfiles.d
auto.smb                     hosts.deny             NetworkManager  rc.single            udev
avahi                        hp                     nsswitch.conf   rejmerge.conf        udisks2
bash_completion.d            idmapd.conf            ntp             request-key.conf     updatedb.conf
bootsplash                   inetd.conf             openldap        request-key.d        UPower
ConsoleKit                   init.d                 pam.conf        resolv.conf          usb_modeswitch.conf
cron                         inittab                pam.d           resolvconf.conf      usb_modeswitch.d
cron.d                       inputrc                passwd          rpc                  vdpau_wrapper.cfg
crontab                      iproute2               passwd-         rsyncd.conf          vmware-tools
cups                         ipsec.conf             pcmcia          samba                wbar.d
cupshelpers                  ipsec.d                php             sasl2                wgetrc
dbus-1                       ipsec.secrets          pkgadd.conf     screenrc.airoscript  whois.conf
default                      issue                  pkgmk.conf      securetty            WindowMaker
depmod.d                     kernel                 pki             security             wpa.conf
dhcpcd                       ld.so.cache            pm              services             X11
drirc                        ld.so.conf             polkit-1        sgml                 xdg
dropbear                     ld.so.conf.d           popt.d          shadow               xfce4
environment                  libvirt                ports           shadow-              xinetd.conf.sample
esd.conf                     localtime              ppp             shells               xml
exim                         login.defs             prelink.conf    ssh                  xorg
exports                      logrotate.d            profile         ssl
exports.d                    man.conf               protocols       strongswan.conf
[root@centos etc]# pwd
/root/thinstation/etc
Doncuppjr commented 6 years ago

/build/packages/freerdp/etc/cmd/ On Thursday, May 17, 2018, 6:27:51 AM PDT, AlexandrSpb notifications@github.com wrote:

I can`t find it :) [root@centos etc]# ls acpi fonts mime.types prt-get.conf strongswan.d adjtime foomatic mke2fs.conf rc stunnel airoscript-ng_advanced.conf fstab modprobe.d rc.conf sudoers airoscript-ng.conf gconf modules-load.d rc.d sudoers.d airoscript-ng_debug.conf gnome-settings-daemon mono rc.fix swanctl apache group motd rc_keymaps sysconfig autofs group- mplayer rc.local sysctl.conf autofs_ldap_auth.conf gssapi_mech.conf mtab rc_maps.cfg sysctl.d auto.master host.conf my.cnf rc.modules syslog.conf auto.misc hosts nas rc.multi systemd auto.net hosts.allow netconfig rc.shutdown tmpfiles.d auto.smb hosts.deny NetworkManager rc.single udev avahi hp nsswitch.conf rejmerge.conf udisks2 bash_completion.d idmapd.conf ntp request-key.conf updatedb.conf bootsplash inetd.conf openldap request-key.d UPower ConsoleKit init.d pam.conf resolv.conf usb_modeswitch.conf cron inittab pam.d resolvconf.conf usb_modeswitch.d cron.d inputrc passwd rpc vdpau_wrapper.cfg crontab iproute2 passwd- rsyncd.conf vmware-tools cups ipsec.conf pcmcia samba wbar.d cupshelpers ipsec.d php sasl2 wgetrc dbus-1 ipsec.secrets pkgadd.conf screenrc.airoscript whois.conf default issue pkgmk.conf securetty WindowMaker depmod.d kernel pki security wpa.conf dhcpcd ld.so.cache pm services X11 drirc ld.so.conf polkit-1 sgml xdg dropbear ld.so.conf.d popt.d shadow xfce4 environment libvirt ports shadow- xinetd.conf.sample esd.conf localtime ppp shells xml exim login.defs prelink.conf ssh xorg exports logrotate.d profile ssl exports.d man.conf protocols strongswan.conf [root@centos etc]# pwd /root/thinstation/etc

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

AlexandrSpb commented 6 years ago

I have did this, but problem is same. User tab disappear. I see only server tab, but no auto connection and manual. How we can resolve it?

Doncuppjr commented 6 years ago

FREERDP_SELECT_SERVER=true

On Thursday, May 17, 2018, 6:59:28 AM PDT, AlexandrSpb <notifications@github.com> wrote:  

I have did this, but problem is same. User tab disappear. I see only server tab, but no auto connection and manual. How we can resolve it?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

AlexandrSpb commented 6 years ago

After enabled FREERDP_SELECT_SERVER option in thinstation.conf.buildtime I see console of Xdialog v2.3.1 with many options and two buttons in a bottom of window - Connect and Print. What is it?

AlexandrSpb commented 6 years ago

How we can resolve this problem?

AlexandrSpb commented 6 years ago

Any news? What I did wrong?

Thinstation commented 6 years ago

I don’t know right now. I didn’t wright that script. I will look into it, if it’s still an issue next week.

Sent from my iPhone

On May 22, 2018, at 7:03 AM, AlexandrSpb notifications@github.com wrote:

Any news? What I did wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AlexandrSpb commented 6 years ago

I can give you remote acces to this machine, if you need.

вт, 22 мая 2018 г., 21:44 Thinstation notifications@github.com:

I don’t know right now. I didn’t wright that script. I will look into it, if it’s still an issue next week.

Sent from my iPhone

On May 22, 2018, at 7:03 AM, AlexandrSpb notifications@github.com wrote:

Any news? What I did wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/305#issuecomment-391099089, or mute the thread https://github.com/notifications/unsubscribe-auth/Akt6t1uZJK9rfNPx-OklDrsCZY9Ac0vDks5t1FyhgaJpZM4UDA1b .

AlexandrSpb commented 6 years ago

Any news?

AlexandrSpb commented 6 years ago

Any news????

Doncuppjr commented 6 years ago

I can’t even even get a VM  to run decently on my server right now. It’s the craziest thing. Both freenas and esxi are virtualizing at a ridiculously slow rate. Takes like 2 hours to install windows, so it is essentially an unworkable problem for me at this point. I have to fix my lab, but I’m not sure about the best way to do it. Maybe just install Server natively and try hyper-v.

Sent from Yahoo Mail for iPhone

On Tuesday, June 26, 2018, 2:51 AM, AlexandrSpb notifications@github.com wrote:

Any news????

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

JanKgh commented 6 years ago

Same issue here. Busybox is missing the link for catv, imho

Aug 27 09:42:23 b3-ts-client thinstation[1847]: Connecting to 10.1.0.93 (10.1.0.93:80) Aug 27 09:42:23 b3-ts-client thinstation[1847]: thinstation.conf-b3- 100% |****| 113 0:00:00 ETA Aug 27 09:42:23 b3-ts-client thinstation[1847]: /lib/thinstation/system/network_files: line 137: catv: not found

JanKgh commented 6 years ago

busybox lacks the catv command

b3-ts-client:/lib/systemd/system# busybox BusyBox v1.29.1 (2018-07-31 16:11:14 UTC) multi-call binary. BusyBox is copyrighted by many authors between 1998-2015. Licensed under GPLv2. See source distribution for detailed copyright notices.

Usage: busybox [function [arguments]...] or: busybox --list[-full] or: busybox --install [-s] [DIR] or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.

Currently defined functions: [, [[, adjtimex, arp, ash, awk, base64, basename, bash, blockdev, brctl, bunzip2, bzcat, bzip2, cat, chgrp, chmod, chown, chpst, chvt, clear, cp, crond, crontab, cut, date, deallocvt, depmod, df, dirname, dmesg, dnsdomainname, dos2unix, du, echo, egrep, eject, env, envdir, envuidgid, expr, factor, fallocate, false, fatattr, fdisk, fgconsole, fgrep, find, findfs, free, fsck, fsfreeze, fsync, ftpget, ftpput, fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hdparm, head, hostid, hostname, hwclock, i2cdetect, i2cdump, i2cget, id, ifconfig, init, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, iplink, ipneigh, iproute, iprule, iptunnel, kill, killall, killall5, klogd, less, link, linux32, linux64, ln, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsmod, lsof, lsscsi, lzcat, lzma, lzop, lzopcat, md5sum, mesg, mkdir, mkfifo, mknod, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mv, netstat, nice, nl, nmeter, nohup, nproc, nsenter, nslookup, openvt, partprobe, paste, pgrep, pidof, ping, ping6, pipe_progress, pkill, pmap, poweroff, powertop, printenv, printf, ps, pstree, pwd, pwdx, readlink, realpath, reboot, reset, resize, rfkill, rm, rmdir, rmmod, route, run-parts, runlevel, sed, seq, setarch, setconsole, setfattr, setlogcons, setpriv, setserial, setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, shuf, slattach, sleep, smemcap, softlimit, sort, ssl_client, start-stop-daemon, stat, stty, su, sum, swapoff, swapon, sync, sysctl, syslogd, tac, tail, tar, taskset, tc, tee, telnet, test, tftp, time, top, touch, tr, traceroute, traceroute6, true, tty, ttysize, tunctl, udhcpc, udhcpc6, uevent, umount, uname, uncompress, uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, users, uudecode, uuencode, vconfig, vi, volname, watch, wc, wget, which, who, whoami, whois, xargs, xz, xzcat, zcat, zcip

JanKgh commented 6 years ago

jk@alderaan /opt/platz/home-jk/src/thinstation/ts/ports/components/busybox $ grep -i catv ts.config CONFIG_FEATURE_CATV=y

but it is enabled in the buildsystem

JanKgh commented 6 years ago

OK, here is my workaround put in thinstation.conf.buildtime

FREERDP_CERTIGNORE=on FRDPOPTIONS=" -sec-rdp -sec-nla +fonts +aero +window-drag +menu-anims"

-sec-rdp and -sec-nla does the trick The space before -sec-rdp is important!

The issue is patched upstream https://github.com/FreeRDP/FreeRDP/issues/4449

trentasis commented 6 years ago

Hi, one question, are you using dialog from thinstation (using freerdp.getuser and freerdp.getpass) or without and using directly widnwos prompt? using you suggested config ask password two times on cluster of TS with connection brooker, do you use this? Can you give details how do you have solved, thinstation side?

thanks

JanKgh commented 6 years ago

Hi, the important files for the dialog from thinstation are /etc/cmd/freerdp.window and /etc/cmd/freerdp.global. There are the commands the dialog will call. They are created at bootup-time with /usr/lib/thinstation/system/freerdp-init. All Variables in this file can be used in a thinstation.conf.[build|network|] to customize the values. For a successful connection to win2016 it is important to disable sec-rdp and sec-nla. The only way i found, without break in some code of ts, is this undocumented "feature" :)

trentasis commented 6 years ago

Hi,

First, Thanks for your help. We are using sec-ssl. our problem is that we have multiple server with sessin broker, and always enter two times password. In you environment do you have one or more ts servers, I think that this is our issue

Any suggestion?

Thanks

JanKgh commented 6 years ago

No, we don't use many ts servers nor connection brokers

trentasis commented 6 years ago

Do you know how freerdp and entry dialog are integrated, to pass data to freerdp client? Thanks

JanKgh commented 6 years ago

the dialog is startet with /etc/init.d/freerdp.

trentasis commented 6 years ago

HI,

Thanks great information. One question his script is not on github source, is his gerated on boot, I don't understand where and how is configured this script... ?

Thanks

Missatge de JanKgh notifications@github.com del dia dt., 4 de set. 2018 a les 11:03:

the dialog is startet with /etc/init.d/freerdp.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/305#issuecomment-418294542, or mute the thread https://github.com/notifications/unsubscribe-auth/AM316LSGNUkqZuclXxSTg1qZTjoW_c7Yks5uXkHMgaJpZM4UDA1b .

Doncuppjr commented 6 years ago

Its a link to /etc/thinstation.packages . It’s is configured by thinstation.conf.buildtime or by network files downloaded during boot.

Sent from Yahoo Mail for iPhone

On Tuesday, September 4, 2018, 9:44 AM, trentasis notifications@github.com wrote:

HI,

Thanks great information. One question his script is not on github source, is his gerated on boot, I don't understand where and how is configured this script... ?

Thanks

Missatge de JanKgh notifications@github.com del dia dt., 4 de set. 2018 a les 11:03:

the dialog is startet with /etc/init.d/freerdp.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/305#issuecomment-418294542, or mute the thread https://github.com/notifications/unsubscribe-auth/AM316LSGNUkqZuclXxSTg1qZTjoW_c7Yks5uXkHMgaJpZM4UDA1b .

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

trentasis commented 6 years ago

Thanks, do you know if it could be possible to do similar that is described here https://github.com/rdesktop/rdesktop/wiki/rdesktop-in-a-graphical-environment I think that is a rdesktop requirement with latest versions...

Any suggestion?

Thanks

Thinstation commented 6 years ago

It is possible, but not necessary. Do you have sec-nla enabled?

trentasis commented 6 years ago

Hi, rdesktop Reading rdesktop seems that rdesktop has no support for nla

freerdp (without nla) tried using /cert-ignore /sec:tls

freerdp (with nla) ask password from cli, and same error that has rdesktop without nla, cli password required and broken dialog usage

Problem is ta Hat in both cases wih cluster rdp using session brokers is requiring two logins, for this reason latest freerdp andrdesktop asks pwd from cli. I'm evaluating thinstation.packages but for me it is difficult to undertstand all code used, suggestion where to focus to solve this issues?

Thanks!

JanKgh commented 6 years ago

I have created a package for this. Look at the attachment delta-terminal.tar.gz extract it in ../build/packages activate it in build.conf, activate autoruns too add AUTORUNS_XFCE_0="start_delta_freerdp_session.sh" to thinstation.conf.build HTH

Thinstation commented 6 years ago

order_command()

Sent from my iPhone

On Sep 4, 2018, at 12:25 PM, trentasis notifications@github.com wrote:

Hi, rdesktop Reading rdesktop seems that rdesktop has no support for nla

freerdp (without nla) tried using /cert-ignore /sec:tls

freerdp (with nla) ask password from cli, and same error that has rdesktop without nla, cli password required and broken dialog usage

I'm evaluating thinstation.packages but for me it is difficult to undertstand all code used, suggestion where to focus to solve this issues?

Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

trentasis commented 6 years ago

I'm not understanding exactly what is order_command(), is all options and command used to rune rfesktop or freerdp...?

we configure session_0 as rdesktop or freerdp

Thanks

Thinstation commented 6 years ago

order_command() is the function within thinstation.packages, where the actual command to be run to launch freerdp or rdesktop is built-up.

On Thu, Sep 6, 2018 at 3:41 PM trentasis notifications@github.com wrote:

I'm not understanding exactly what is order_command(), is all options and command used to rune rfesktop or freerdp...?

we configure session_0 as rdesktop or freerdp

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/305#issuecomment-419264594, or mute the thread https://github.com/notifications/unsubscribe-auth/ACtufkzFxoxaGxwX4aw62yXrIZf_KYkbks5uYaSSgaJpZM4UDA1b .

trentasis commented 6 years ago

Thanks, one questin, exist any options or way to debug while you run thinstation, to be used during develop of new code? Thanks

Thinstation commented 6 years ago

That depends on what your are trying to debug. The OS? The dialogs? An individual package?

On Fri, Sep 7, 2018 at 12:11 PM trentasis notifications@github.com wrote:

Thanks, one questin, exist any options or way to debug while you run thinstation, to be used during develop of new code? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/305#issuecomment-419537641, or mute the thread https://github.com/notifications/unsubscribe-auth/ACtufg7ndgVxI4qngAq49MKfYgwFxmAMks5uYsTzgaJpZM4UDA1b .

trentasis commented 6 years ago

Hi dialogs and interaction vars to pass username and password from dialog to rdesktop and freerdp commands...

Thinstation commented 6 years ago

At the top of thinstation.packages, add set -x

Make sure you have a build with terminal and at the terminal, run pkg window freerdp