LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2017, 08:59 AM   #1
nwunye
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
Exclamation How to Display Message to User after kicking them out with "pkill -u $user"


I'm running a script that kicks specified users off my server after a specified time.

However, after the user is kicked off, I would like to display a message explaining to the user why they were kicked off.

I've tried the ".bash_logout" file but the message displays only after the user logs themselves out, not after my script kicks them off.

I appreciate any help with this - thank you!
 
Old 10-06-2017, 11:19 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,140

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
There's a CLI command write that sends a message, but I'm not sure whether that works on a GUI. There's also a program called LinPopUp which does produce a window in the GUI, so long as you have Samba installed.
http://linpopup2.sourceforge.net/
 
  


Reply

Tags
log off, scripting, user account



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved: error message "localhost kdm_greet[15114]: Can't open default user face" jlinkels Linux - Software 4 02-12-2010 04:44 PM
PostFix + ISPConfig mail return "unknown user" or "no such user here" Jacky444 Linux - Server 1 02-10-2010 04:21 PM
A graphical message for a user. (a "wall" equivalent) ErV Linux - General 7 04-21-2007 11:43 AM
What is "Error sending message, child exited 67 (User unknown.)."? using mutt jonathanztaub Linux - General 0 05-17-2004 09:04 AM
Shorten a Qmail user name to "user" instead of "user@domain.com" anorman Linux - Software 0 12-12-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration