LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-03-2018, 06:10 PM   #16
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242

whatever desktop you're going to be using, look into its mechanism it uses to issue the commands, circumvent that with a script that checks for more than one user first, then if yes issue a separate message dialog box with whatever you want it to say, and from that you can disallow such commands to shut down, or reboot, else one user, then have that script then issue the command given. that is what I'd do.

find where the Desktop is calling to when one uses the menu to reboot, shut down, replace within that your script executable,

Code:
#!/bin/sh

 howmany=$(who | awk '{print $1}' | wc -l)

 if [[ "$howmany" -eq '1' ]]
then

"call the script that was already being called here" 
else
'issue another message back to user, others are 
still lodged in, sign out of your account instead. blah blah blah..'
fi

Last edited by BW-userx; 11-03-2018 at 06:33 PM.
 
Old 11-04-2018, 02:58 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by BW-userx View Post
Code:
[userx@manjaroieo ~]$ reboot
User root is logged in on tty4.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.
seems to point to systemd inhibitors.
maybe you should check those out.
Code:
man systemd-inhibit
 
Old 11-04-2018, 10:57 AM   #18
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
I looked at inhibitors. Doesn't satisfy the goal. One, inhibitors are command line only. As I shared previously, users are GUI oriented. Pointy-clicky. They need to see why their power down or reboot effort aborted. Two, systemd-inhibit does not abort processes but only stalls them. I want the power down or reboot to abort.

One of the speed bumps of the Linux desktop is the overwhelming focus on using the terminal. Developers do not grasp how the majority of users are GUI oriented and the entire concept of the terminal is foreign. I have been using Linux based systems for 16 years and I would struggle deeply without a terminal. But I see how non technical users handle computers every day. Even at work computer savvy co-workers are GUI oriented. When I open a terminal and start cranking out commands or using standard tools such as sed or grep, the co-workers grow eerily quiet and kind of step back a half step.

I looked at molly-guard but that too is command line only. Mostly focused on preventing unwanted reboots and shut downs when using SSH. All feedback is command line.

Summary: I cannot use a command line option. My solution must be GUI.

I am comfortable stating that polkit is the answer. I just haven't figured out the nuances. I will start a new thread for that.
 
Old 11-04-2018, 01:36 PM   #19
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by upnort View Post
I looked at inhibitors. Doesn't satisfy the goal. One, inhibitors are command line only. As I shared previously, users are GUI oriented.
it might not do what you want, but saying systemd inhibitors are command line only is - a misiterpretation of how these things work.
 
Old 11-04-2018, 01:54 PM   #20
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
16yrs under your belt, what desktop will you be using?
this is it, yes?
Ubuntu MATE 16.04 and the LightDM login manager.

Problem, anyone can reboot, shut down the system if more than one user is still logged in to same said system.

solution needed, circumvent the shut down, reboot event, to allow only login out of user account if more than one user is logged into same said system. Needs to be GUI driven.

Last edited by BW-userx; 11-04-2018 at 02:12 PM.
 
Old 11-04-2018, 02:11 PM   #21
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by upnort View Post
Developers do not grasp how the majority of users are GUI oriented and the entire concept of the terminal is foreign.
I'm not sure I'd agree with that. I'd suggest that the majority of Linux users are more than familiar with the terminal and CLI, 'tho I don't have any statistics to support my opinion. (Which is not to disagree with your particular challenge at the moment)

I've got 19 years in *nix administration and support, and am only beginning to "learn" the nuances of desktop environments...when I get stuck, I just open a terminal window...
 
Old 11-04-2018, 03:41 PM   #22
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
well that logout button on mate panel is hard wired into the code, it'd take a git pull and mod panel-action-button.c and whatever else, as well as downloading everything needed to compile it and test it, get it to work then install in onto your system blacklist any updates for it, then you're in like flint.
 
Old 11-08-2018, 02:34 PM   #23
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
I am tagging this thread as SOLVED. A polkit pkla file was the solution.
 
1 members found this post helpful.
Old 11-08-2018, 04:30 PM   #24
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by upnort View Post
I am tagging this thread as SOLVED. A polkit pkla file was the solution.
pls post your solution for others to learn from your experiences. thanks!
 
Old 11-08-2018, 05:51 PM   #25
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
pls post your solution for others to learn from your experiences.
I did!
 
Old 11-08-2018, 05:58 PM   #26
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by upnort View Post
I did!
oh that link, that's mis-leading.

I fixed my issue using this as a guild --> here
 
Old 11-09-2018, 03:18 AM   #27
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by upnort View Post
I am tagging this thread as SOLVED. A polkit pkla file was the solution.
did you write that article, upnort?
is that your blog?
 
Old 11-09-2018, 06:49 AM   #28
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ondoho View Post
did you write that article, upnort?
is that your blog?
if it is, he didn't even give credit where credits due for helping him in his endeavors.
 
Old 11-09-2018, 11:38 AM   #29
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
did you write that article, upnort?
is that your blog?
Yes and yes. Select the About Me link at the top of any page. Also notice my LQ signature.

Last edited by upnort; 11-09-2018 at 11:40 AM.
 
Old 11-10-2018, 04:04 AM   #30
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by upnort View Post
Also notice my LQ signature.
oops.
 
  


Reply



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
How Linux is multi user operating system ? ift38375 Linux - Newbie 39 01-01-2013 03:11 AM
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 04:49 PM
Multi user sound system onthefritz Fedora 3 04-21-2006 03:41 PM
Is MAC OS X Multi user system ?? my-unix-dream Linux - General 1 06-17-2005 10:12 AM
UNIX multi user,tasks system ? why ? my-unix-dream Linux - Newbie 5 06-27-2004 03:51 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:46 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