Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to notify a certain user to call me, the admin, since I disabled his account. I could set /etc/issue.net, but this is shown to all login attempts. Is there a way to restrict a message/banner to a certain user?

Thanks

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Re-enable the user's login, but change the account's shell to a script which outputs the message and exits.

share|improve this answer
    
My Linux (Centos, a Redhat clone) uses /sbin/nologin as a shell in these situations, which reads /etc/nologin.txt as a message –  Rich Homolka Mar 2 '11 at 17:27
    
The banner is displayed before connection, and though your answer satisfies the OP, it's not what was asked. Any idea about per-user banner? (and not motd) –  Geoffroy Mar 16 '12 at 18:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.