I tried to create a new user account with useradd. After logging in to the new account I got the following error message:
-sh: mesg: not found
It turned out that the .profile script references this tool. Removing the mesg line from both user's .profile and /etc/skel/.profile suppresses it.
So I suggest the change of /etc/skel/.profile for the upcoming Yocto Linux release into:
# ~/.profile: executed by Bourne-compatible login shells.
if [ -f ~/.bashrc ]; then
# path set by /etc/profile
# export PATH
Thanks, good catch! Although it's only an error message without any severe implications it's not nice to have such kind of messages.
Alternatively one could include / install linux-util packages which include the "mesg" command.
AlexT_Intel - something for your repo? Builds fine from Yocto recipes ...
I can confirm, that I get that message as well, on build_68, although this issue may have been addressed in the latest firmware image.
As the ./profile you described is referring to the bash shell, I know work was being done on it due to the prior bash shell-shock vulnerabilities.
and mhahn now has AlexT_Intel checking into it again
mdw - are you using the latest firmware image which should read build_16 with a cat /etc/version?
According to the /servlet/JiveServlet/downloadBody/23158-102-6-27348/edison-module_HG_331189-002.pdf https://communities.intel.com/servlet/JiveServlet/downloadBody/23158-102-6-27348/edison-module_HG_33...
Section 1.4 Fix for CVE-2014-7169 "shellshock", was addressed in the latest firmware release (build_16)
A work around users can apply.
Edit your /etc/skel/.profile file and remove or comment out the last line "mesg n" as it appears the binary mesg file is not included with the image, you would have to also edit /home/your_user/.profile and do the same for each of your new users you have added. Additional users after this would get their file from /etc/skel which you fixed.
2) add a mesg binary executable or script in a path included directory to provide your users with your message-of-the-day messages.
Default user paths directories are /usr/local/bin:/usr/bin:/bin
although surely possible I don't quite like the idea modifying the scope of programs. "mesg n" is not about sending out a message but about preventing others to send a message to the console
I see, and possibly why mesg was not included, I'll remove it from my suggested work around -- leaving more or less what was mentioned in the first place.
I certainly see a use in separating end-user access/functions from system access/functions as a product gets ready for market.
So what about the proposed fix? We could add some check if "mesg" is there before executing it:
if which mesg > /dev/null; then
Shouldn't this be fixed for the upcoming Yocto Linux Images? I think my change would be the best since it works with and without mesg. Otherwise mesg should be installed by default.