1831320 Members
3214 Online
110023 Solutions
New Discussion

mesg: cannot change mode

 
SOLVED
Go to solution
Robert Funk_1
Contributor

mesg: cannot change mode

When some users login via telnet, they see this message: mesg: cannot change mode. Other users don't. Can you educate me as to what this means? Also, how can I fix it so they don't see this message any longer? Thanks, Robert
3 REPLIES 3
Mark Grant
Honored Contributor
Solution

Re: mesg: cannot change mode

"mesg" is a command that allows or denies messages from users using "wall" or "talk" to be sent to the terminal. My guess would be that the permisions on the device this user uses is wrong. type "tty" and then "ls -l" on the result to see if your user actually has permission to modify the permission on this device.

To be honest though, very few people use this any more except for broadcast messages saying the machine is going down. SO another alternaive is to remove the "mesg" command from $HOME/.profile or /etc/profile or wherever it is.
Never preceed any demonstration with anything more predictive than "watch this"
Steven E. Protter
Exalted Contributor

Re: mesg: cannot change mode

You probably have the following code in /etc/profile .profile or other source files.

mesg n > /dev/null

When su - to another user this code, which is designed to secure the terminal files from hackers doesn't have rights to execute. Its just a message, and can safely be ignored.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: mesg: cannot change mode

This has to do with the 'mesg' command. In either the /etc/profile or the users .profile you may see a line like 'mesg n'. That is most likely the cause of your problem.

If you want to eliminate these messages then you could comment out the 'mesg n' line.

For more information on what this does to a 'man mesg'.