Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teleport truncates motd with PAM #2477

Closed
vad opened this issue Jan 10, 2019 · 0 comments · Fixed by #2831
Closed

Teleport truncates motd with PAM #2477

vad opened this issue Jan 10, 2019 · 0 comments · Fixed by #2831
Assignees
Milestone

Comments

@vad
Copy link

vad commented Jan 10, 2019

What happened:

I enabled PAM to get the MOTD. The MOTD is fine with ssh but is truncated with teleport (tsh ssh).

MOTD with tsh ssh:

Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1031-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Jan 10 10:35:45 UTC 2019

  System load:  0.07               Processes:              130
  Usage of /:   30.4% of 19.32GB   Users logged in:        1
  Memory usage: 35%                IP address for eth0:    <IP>
  Swap usage:   0%                 IP address for ubuntu@myhost:~$ 

What you expected to happen:

This is MOTD with ssh:

$ ssh ubuntu@myhost
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1031-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Jan 10 10:31:34 UTC 2019

  System load:  0.56               Processes:              132
  Usage of /:   30.4% of 19.32GB   Users logged in:        1
  Memory usage: 35%                IP address for eth0:    <IP>
  Swap usage:   0%                 IP address for docker0: 172.17.0.1

 * MicroK8s is Kubernetes in a snap. Made by devs for devs.
   One quick install on a workstation, VM, or appliance.

   - https://bit.ly/microk8s

 * Full K8s GPU support is now available!

   - https://blog.ubuntu.com/2018/12/10/using-gpgpus-with-kubernetes


  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

2 packages can be updated.
0 updates are security updates.


Last login: Thu Jan 10 10:05:34 2019 from <IP>
ubuntu@myhost:~$ 

How to reproduce it (as minimally and precisely as possible):

Enable PAM:

ssh_service:
  enabled: "yes"
  listen_addr: 0.0.0.0:3022
  pam:
    enabled: "yes"
    service_name: "teleport"
# diff /etc/pam.d/sshd /etc/pam.d/teleport 
22c22
< session    required     pam_loginuid.so
---
> #session    required     pam_loginuid.so

Due to issue #2476 .

Environment:

  • Teleport version (use teleport version): Teleport v3.0.1 git:v3.0.1-0-g4ff9a7b0
  • Tsh version (use tsh version): Teleport v3.0.1 git:v3.0.1-0-g4ff9a7b0
  • OS (e.g. from /etc/os-release): Ubuntu 18.04.1 LTS

Relevant Debug Logs If Applicable

Logs are fine:

Jan 10 10:35:45 ip-172-31-42-53 teleport[3303]: pam_unix(teleport:session): session opened for user ubuntu by (uid=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants