Computing.Net > Forums > Unix > Login greetings

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Login greetings

Reply to Message Icon

Name: Aiikahn
Date: October 12, 2002 at 05:17:09 Pacific
OS: Win 98
CPU/Ram: 128
Comment:

Does anyone know how to write a script to find out if a particular user is logged in to unix and send a greeting if there logged in; otherwise, if they're not return a message they're not logged on.

I'm still a beginner at this and I know you can use the 'who' command to find who's logged in but how do send a greeting to them by using the 'write' or 'echo' command. I tried using the 'write' command but it kept saying the write permission is off.



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: October 12, 2002 at 06:39:05 Pacific
Reply:

The environment variable mesg is set to either 'y' or 'n'. If it is set to 'n' for a user the refuse write messages and talk messages. A wall message gets sent to everyone that is logged on to the current system. A wall message is terminated with control-d. The root user ignores to value of mesg and can write to a user's console regardless.


0
Reply to Message Icon

Related Posts

See More


string in log for more th... reinstalling unix



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Login greetings

FreeBSD install/login/pswd www.computing.net/answers/unix/freebsd-installloginpswd/4396.html

login & pswd www.computing.net/answers/unix/login-amp-pswd/4390.html

Automating login www.computing.net/answers/unix/automating-login/145.html