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

Scripts will not run on login #22

Open
joeySeal opened this issue Feb 27, 2021 · 8 comments
Open

Scripts will not run on login #22

joeySeal opened this issue Feb 27, 2021 · 8 comments

Comments

@joeySeal
Copy link

joeySeal commented Feb 27, 2021

Running ubuntu 20.04 server, all required packages are install, script files have the same permissions as the default scripts, sshd has printmotd set to yes. Any advice?

update-motd: /usr/sbin/update-motd /etc/update-motd.d /usr/share/man/man5/update-motd.5.gz /usr/share/man/man8/update-motd.8.gz
figlet: /usr/bin/figlet /usr/share/figlet /usr/share/man/man6/figlet.6.gz
lolcat: /snap/bin/lolcat
hddtemp: /usr/sbin/hddtemp /etc/hddtemp.db /usr/share/man/man8/hddtemp.8.gz
~$ ls -la /etc/update-motd.d/
total 44
drwxr-xr-x   2 root root  4096 Feb 27 09:20 .
drwxr-xr-x 128 root root 12288 Feb 27 09:03 ..
-rwxr-xr-x   1 root root    72 Jul 12  2020 00-hostname-color
-rwxr-xr-x   1 root root  1246 Jul 12  2020 20-sysinfo
-rwxr-xr-x   1 root root  1074 Jul 12  2020 30-zpool-bar
-rwxr-xr-x   1 root root  1084 Jul 12  2020 35-diskspace
-rwxr-xr-x   1 root root  1810 Jul 12  2020 36-diskstatus
-rwxr-xr-x   1 root root   883 Jul 12  2020 40-services
-rw-r--r--   1 root root   998 Jul 12  2020 README.md```

@yboetz
Copy link
Owner

yboetz commented Feb 27, 2021

Maybe UsePAM yes in sshd_config? Apart from that I have no idea.

@wemiprog
Copy link

I found solutions after hours of trying😅 Hope works for you too

with update-motd it works anyway. But not when logging in

my case:
On ubuntu, lolcat is installed in /usr/games/lolcat
Apparently there are restrictions for this folder. So I just moved lolcat to /usr/bin/ and it worked

You haven’t installed lolcat in games but try it anyway

if it worked I’ll create pull request for read me , so other user won’t have to try

@yboetz
Copy link
Owner

yboetz commented Apr 12, 2021

My lolcat is under /usr/games/lolcat (Ubuntu 20.04), works for me.

@wemiprog
Copy link

wemiprog commented Apr 12, 2021

Okay strange 😅
I tried almost everything else 🙈

do you work as root or not?

@yboetz
Copy link
Owner

yboetz commented Apr 12, 2021

update-motd scripts should be executed as root, there are a few scripts that need root access. The one using lolcat should also work as non-root.

@jon4hz
Copy link

jon4hz commented Apr 23, 2021

By default root doesn't has /usr/games/ in the $PATH. So it kinda makes sense that update-motd can't execute that. I had the same issue and also solved it by moving lolcat to /usr/bin/

I am not sure how it is with the installation with snap but I would imagine that there is a similar problem. I can only advise against using snap anyway....

@Mike-Bros
Copy link

Just wanted to add I had the same issue and moving from /usr/games/ to /usr/bin/ fixed it!

@wojciehm
Copy link

Just wanted to add I had the same issue and moving from /usr/games/ to /usr/bin/ fixed it!

Helped me as well. Thanks!

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

No branches or pull requests

6 participants