Add NLA security and PAM Authentication support in weston RDP backend

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Add NLA security and PAM Authentication support in weston RDP backend

Add NLA security and PAM Authentication support in weston RDP backend

Test Environment:

i.MX8MP EVK

L6.6.52(weston12)

 

Background

Current RDP only supports TLS authentication, but does not support the NLA feature or PAM password authentication. Therefore, the connection security of RDP will be very low, and you can even login remotely without the correct username and password.

This article implements the NLA feature and PAM password authentication base on weston rdp backend, which supports customized user and login.

 

1.Patches

patch weston-imx with add_rdp_pam_nla_support.patch

patch meta-imx with add_pam_support_and_weston_user.patch

 

2.Generate keys on Ubuntu

rename key as server.crt and server.key

sudo apt-get install winpr-utils   

winpr-makecert -rdp -path  ~/

copy server.crt and server.key from Ubuntu to /etc/freerdp/keys/ on i.MX board

3. Enable start-on-startup=true in weston.ini

 

4.Install Remmina on Ubuntu.

 

5.Generate SAM file on board and Ubuntu: /etc/winpr/SAM(SAM is a file, not a directory) and copy hash into /etc/winpr/SAM

The username weston and passwd has been set in add_pam_support_and_weston_user.patch.

username: weston

passwd: weston

domain: domain

 

$ winpr-hash  -u weston -d domain -p weston -v1 -f sam
weston:domain::b2ca4ec6a1dbd13c49b6ab5e1b10d5bf:::
$ vi /etc/winpr/SAM

 

6.Access with Remmina on Ubuntu.

Zhiming_Liu_1-1737093217446.png

7.Result

Zhiming_Liu_0-1737093197855.png

 

 

 

附件
%3CLINGO-SUB%20id%3D%22lingo-sub-2029512%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3EAdd%20NLA%20security%20and%20PAM%20Authentication%20support%20in%20weston%20RDP%20backend%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2029512%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3ETest%20Environment%EF%BC%9A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Ei.MX8MP%20EVK%3C%2FP%3E%0A%3CP%3EL6.6.52(weston12)%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EBackground%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ECurrent%20RDP%20only%20supports%20TLS%20authentication%2C%20but%20does%20not%20support%20the%20NLA%20feature%20or%20PAM%20password%20authentication.%20Therefore%2C%20the%20connection%20security%20of%20RDP%20will%20be%20very%20low%2C%20and%20you%20can%20even%20login%20remotely%20without%20the%20correct%20username%20and%20password.%3C%2FP%3E%0A%3CP%3EThis%20article%20implements%20the%20NLA%20feature%20and%20PAM%20password%20authentication%20base%20on%20weston%20rdp%20backend%2C%20which%20supports%20customized%20user%20and%20login.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E1.Patches%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Epatch%20%3CSTRONG%3Eweston-imx%3C%2FSTRONG%3E%20with%20%3CSTRONG%3Eadd_rdp_pam_nla_support.patch%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Epatch%20%3CSTRONG%3Emeta-imx%3C%2FSTRONG%3E%20with%20%3CSTRONG%3Eadd_pam_support_and_weston_user.patch%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E2.Generate%20keys%20on%20Ubuntu%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Erename%20key%20as%20server.crt%20and%20server.key%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Esudo%20apt-get%20install%20winpr-utils%20%20%20%0A%0Awinpr-makecert%20-rdp%20-path%20%20~%2F%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Ecopy%20server.crt%20and%20server.key%20from%20Ubuntu%20to%20%2Fetc%2Ffreerdp%2Fkeys%2F%20on%20i.MX%20board%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E3.%26nbsp%3BEnable%20start-on-startup%3Dtrue%20in%20weston.ini%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E4.Install%26nbsp%3BRemmina%26nbsp%3Bon%20Ubuntu.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E5.Generate%20%3CSTRONG%3ESAM%3C%2FSTRONG%3E%20file%20on%20board%20and%20Ubuntu%3A%20%2Fetc%2Fwinpr%2FSAM(SAM%20is%20a%20file%2C%20not%20a%20directory)%20and%20copy%20hash%20into%26nbsp%3B%2Fetc%2Fwinpr%2FSAM%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20username%20weston%20and%20passwd%20has%20been%20set%20in%26nbsp%3Badd_pam_support_and_weston_user.patch.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eusername%3A%20%3CSTRONG%3Eweston%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Epasswd%3A%20%3CSTRONG%3Eweston%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Edomain%3A%20%3CSTRONG%3Edomain%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20winpr-hash%20%20-u%20weston%20-d%20domain%20-p%20weston%20-v1%20-f%20sam%0Aweston%3Adomain%3A%3Ab2ca4ec6a1dbd13c49b6ab5e1b10d5bf%3A%3A%3A%0A%24%20vi%20%2Fetc%2Fwinpr%2FSAM%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E6.Access%20with%26nbsp%3B%3CSPAN%3ERemmina%20on%20Ubuntu.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_1-1737093217446.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_1-1737093217446.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F320025i53E710AE856C9CC9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_1-1737093217446.png%22%20alt%3D%22Zhiming_Liu_1-1737093217446.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E7.Result%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_0-1737093197855.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_0-1737093197855.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F320024i2BACDCA61862F8AB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_0-1737093197855.png%22%20alt%3D%22Zhiming_Liu_0-1737093197855.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
无评分
版本历史
最后更新:
‎01-16-2025 11:14 PM
更新人: