2 2
fips

How to change motd?

Recommended Posts

MOTD is generated within /etc/initd.d/armhwinfo while information bar below is generated within /etc/bash.bashrc.custom

 

I have associated question: while I login through SSH on OrangePi with Jessie onboard armhwinfo script is executed flawlessly.

 

However, while login localy, directly to the machine, I am gettin "last login" message, then "Linux orangepi 3.4.108-orangepi #16 SMP PREMPT (...)" line and then the loand&temps line.

 

It seems that locally the toilet banner is substituted with kernel info line. I've read that in Jessie ssh and local motds are separated. How can we change the local then?

 

Thanks.

Share this post


Link to post
Share on other sites

Realise this is an old thread - but as it was one of the first results in Google for this topic, I thought I'd update it with my (rather blunt) solution.

 

1) The script that produces the hardware info is located in /etc/update-motd.d - and is named "30-sysinfo".  Remove it (and if you like, the other scripts in there).  

 

2) Edit /etc/pam.d/login and /etc/pam.d/ssh - comment out the line that reads "session    optional   pam_motd.so motd=/run/motd.dynamic"

 

Result:  Editing /etc/motd now does the right thing - and my system no longer hangs for 30 seconds upon login simply to produce a colour ASCII art banner that tells me what CPU I'm running and what IP I'm logging in from.  

Share this post


Link to post
Share on other sites

Result:  Editing /etc/motd now does the right thing - and my system no longer hangs for 30 seconds upon login simply to produce a colour ASCII art banner that tells me what CPU I'm running and what IP I'm logging in from.  

 

None of mentioned thing eats much time., login takes around 1-2 seconds on an fully booted system. Measured on old A20 board ... (only) when system still loads, this can takes 10s or more.

Share this post


Link to post
Share on other sites

Realise this is an old thread - but as it was one of the first results in Google for this topic, I thought I'd update it with my (rather blunt) solution.

 

1) The script that produces the hardware info is located in /etc/update-motd.d - and is named "30-sysinfo".  Remove it (and if you like, the other scripts in there).  

 

2) Edit /etc/pam.d/login and /etc/pam.d/ssh - comment out the line that reads "session    optional   pam_motd.so motd=/run/motd.dynamic"

 

Result:  Editing /etc/motd now does the right thing - and my system no longer hangs for 30 seconds upon login simply to produce a colour ASCII art banner that tells me what CPU I'm running and what IP I'm logging in from.  

Alternatively, you can do chmod -x 30-sysinfo or any other script you want to disable. The effect is the same as removing but you keep the file in case you want it in the future

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
2 2