LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 07:10 PM   #16
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432

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 07:33 PM.
 
Old 11-04-2018, 03:58 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,904
Blog Entries: 7

Rep: Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438
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, 11:57 AM   #18
upnort
Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS, Ubuntu MATE
Posts: 738

Original Poster
Rep: Reputation: Disabled
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, 02:36 PM   #19
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,904
Blog Entries: 7

Rep: Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438
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, 02:54 PM   #20
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432
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 03:12 PM.
 
Old 11-04-2018, 03:11 PM   #21
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 1,980

Rep: Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622
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, 04:41 PM   #22
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432
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, 03:34 PM   #23
upnort
Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS, Ubuntu MATE
Posts: 738

Original Poster
Rep: Reputation: Disabled
I am tagging this thread as SOLVED. A polkit pkla file was the solution.
 
Old 11-08-2018, 05:30 PM   #24
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432
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, 06:51 PM   #25
upnort
Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS, Ubuntu MATE
Posts: 738

Original Poster
Rep: Reputation: Disabled
Quote:
pls post your solution for others to learn from your experiences.
I did!
 
Old 11-08-2018, 06:58 PM   #26
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432
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, 04:18 AM   #27
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,904
Blog Entries: 7

Rep: Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438Reputation: 2438
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, 07:49 AM   #28
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

Rep: Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432Reputation: 1432
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, 12:38 PM   #29
upnort
Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS, Ubuntu MATE
Posts: 738

Original Poster
Rep: Reputation: Disabled
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 12:40 PM.
 
Old 11-10-2018, 05:04 AM   #30
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,904
Blog Entries: 7

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04: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 05:49 PM
Multi user sound system onthefritz Fedora 3 04-21-2006 04:41 PM
Is MAC OS X Multi user system ?? my-unix-dream Linux - General 1 06-17-2005 11:12 AM
UNIX multi user,tasks system ? why ? my-unix-dream Linux - Newbie 5 06-27-2004 04:51 PM

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

All times are GMT -5. The time now is 06:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration