Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
2,141 Views

"mesg" in /etc/skel/.profile

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

. ~/.bashrc

fi

# path set by /etc/profile

# export PATH

14 Replies
Highlighted
13 Views

Re: "mesg" in /etc/skel/.profile

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 ...

Highlighted
Valued Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

mdw

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)

0 Kudos
Highlighted
New Contributor I
13 Views

Re: "mesg" in /etc/skel/.profile

my version:

root@edison:~# cat /etc/version

edison-rel1-maint-weekly_build_16_2014-10-14_14-56-19

Highlighted
Valued Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

mdw a multiuser Edison project sounds like an interesting approach, what are you working towards?

0 Kudos
Highlighted
Valued Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

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.

0 Kudos
Highlighted
13 Views

Re: "mesg" in /etc/skel/.profile

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

0 Kudos
Highlighted
Valued Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

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.

0 Kudos
Highlighted
New Contributor I
13 Views

Re: "mesg" in /etc/skel/.profile

Just for interest .

mdw a multiuser Edison project sounds like an interesting approach, what are you working towards?
0 Kudos
Highlighted
Valued Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

mdw

I certainly see a use in separating end-user access/functions from system access/functions as a product gets ready for market.

0 Kudos
Highlighted
Honored Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

Yeah, it's already there, the package is "util-linux".

Highlighted
New Contributor I
13 Views

Re: "mesg" in /etc/skel/.profile

So what about the proposed fix? We could add some check if "mesg" is there before executing it:

if which mesg > /dev/null; then

mesg n

fi

0 Kudos
Highlighted
Honored Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

Yes, that's an option too.

0 Kudos
Highlighted
New Contributor I
13 Views

Re: "mesg" in /etc/skel/.profile

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.

0 Kudos
Highlighted
Honored Contributor II
13 Views

Re: "mesg" in /etc/skel/.profile

Well, I don't know because I'm not the one developing that I'll see if I can report that to developers.

0 Kudos