Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

another user 1

Status
Not open for further replies.

ksdh

Technical User
Oct 24, 2007
41
IN
HI
Can anyone tell me hoe to print a message for another user/machine which tries to login to the machine i am using. I mean if any other user logs in , i want to print the message "hello, this is abc, can u please logout since i am testing"

i know it has to be something very simple, but i just cant get it
thanks
 
Which OS? Some enable you to create an /etc/nologin file to stop other logins. Alternatively, think of a message in /etc/profile, /etc/motd etc.

I want to be good, is that not enough?
 
Sorry i am on a solaris box
 
/etc/nologin should do the necessary. Although it is 'officially' meant for use when shutting down the machine, I see no reason why it can't be adapted to this purpose. Try man nologin for details.

I want to be good, is that not enough?
 
Well thats not what i exactly want. I want the user should be able to login, but the Message :"Hello, this system is being used by abc for testing,request you to logout please" be displayed.
So if the user wants to ssh, no problem , he should be able to do so but the above message should appear
 
Using /etc/nologin, the user would be able to telnet/ssh or whatever, and would be presented with whatever text you choose to put in the /etc/nologin file. Is that not the same thing as your proposal?

I want to be good, is that not enough?
 
Don't you have a /etc/motd and/or /etc/issue file ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks a lot Ken/PHV, was able to resolve it.
 
For the benefit of others, can you describe what you decided upon, please?

I want to be good, is that not enough?
 
the /etc/nologin works. Just changed the text and BANG on.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top