LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 06-19-2017, 01:14 AM   #31
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336

Quote:
Originally Posted by MBA Whore View Post
All I want is for only my sudo account to be able to make system changes. I don't want any other user to be able to "SU" or "SUDO" whether it is via command line or GUI.
Basically the sudoers file is used to specify who is allowed to run sudo and how. So you can specify here what commands can be executed by which user (see man visudo for example)
su (not sudo) requires to know the password of root, so you only need to change that password and noone will be able to use it.


Quote:
Originally Posted by MBA Whore View Post
What is the difference between:

1) auth required pam_wheel.so group=sudo

2) # auth required pam_wheel.so group=sudo
# is a comment sign, it means the chars in that line (after #) are ignored. It is almost same as completely removing that line, the only difference is you can easily restore it by removing that # (which cannot be done if you deleted it).
 
Old 06-19-2017, 03:03 AM   #32
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Which can all be managed in a simpler, clearer manner using sudo. The syntax for sudoers is just EBNF and easy to learn if not already familiar.
No, it can not. You need policykit, or consolekit ( not maintained any more ), or consolekit2 ( fork of consolekit ). Not just for those examples I've mentioned, but for many more things that above mentioned "kits" do.

Quote:
PolicyKit apparently comes out of Red Hat and because of that and its other symptoms I wonder how many of its developers have ties to systemd. Regardless, PolicyKit is overly complex and that combined with its origins suggest that Red Hat is using it to make Linux so difficult as to take it out of the hands of anyone except full-time, Red Hat-trained, professionals.

One of their top executives made a statemet about complexity being a sales tactic. This looks like them making good on that threat.
Instead of offering another conspiracy theory and feeding it to the OP, you could offer some technical advice that will work. If you feel that he could do better without policykit, give him advice how to replace it with something that will work.

As a final note to the OP, while preventing unprivileged user to even try to type that password would be good thing, good strong password is better thing.

Last edited by dejank; 06-19-2017 at 03:14 AM.
 
Old 06-19-2017, 03:13 AM   #33
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
Watch the name calling. Red Hat's stated policy is about making things complex. Brian Stevens, while an executive of Red Hat, stated back in 2006 or so:

Quote:
Red Hat's model works because of the complexity of the technology we work with. An operating platform has a lot of moving parts, and customers are willing to pay to be insulated from that complexity. I don't think you can take one finite element—like Apache—and make a business out of it [using our model]. You need product complexity.
And these things do spread from Red Hat usually starting with their almost private sandbox, Fedora.

However, if you want technical advice that will work, go to the earlier posts where I even pointed to the directories and files that need to be changed/examined to prevent PolicyKit from circumventing settings in sudoers
 
Old 06-19-2017, 03:25 AM   #34
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Watch the name calling. Red Hat's stated policy is about making things complex. Brian Stevens, while an executive of Red Hat, stated back in 2006 or so:



And these things do spread from Red Hat usually starting with their almost private sandbox, Fedora.

However, if you want technical advice that will work, go to the earlier posts where I even pointed to the directories and files that need to be changed/examined to prevent PolicyKit from circumventing settings in sudoers
No, it is not name calling, and yes, it is conspiracy theory and some people do like to involve those in posts that require technical advice and not philosophical arguments. You may, or may not be one of those people. And all that there is in that statement is that red hat earns money because technology they work with is complex, not because they make it complex. Work with D-Bus can not be made simple, that is why there are various "kits" out there. If you know for other, more simple way, please share it. Anyway, I'm sure that there are people around with more knowledge than me about that subject.
 
Old 06-19-2017, 03:50 AM   #35
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
And yet everything Red Hat has been doing in recent years has been adding to the complexity and difficulty of Linux and so increasing barriers to use. And thus our costs of using Linux in general increase as a result. While you are right d-bus cannot be made simple, it is only one approach to a set of problems. From here d-bus looks like an unnecessarily complex and ill-scoped approach, and thus wrong.

Again, about technical advice, see the files in the directory /var/lib/polkit-1/localauthority/10-vendor.d/ and work out an override to place in /var/lib/polkit-1/localauthority/50-local.d/ mentioned already back in post #21 From the symptoms, the problem is with pkexec (PolicyKit) and not PAM.
 
Old 06-19-2017, 03:59 AM   #36
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
And yet everything Red Hat has been doing in recent years has been adding to the complexity and difficulty of Linux and so increasing barriers to use. And thus our costs of using Linux in general increase as a result.
Everything? Really? For example?

Quote:
While you are right d-bus cannot be made simple, it is only one approach to a set of problems. From here d-bus looks like an unnecessarily complex and ill-scoped approach, and thus wrong.
Great. Care to offer better approach? Lots of people would love less complex things. I'm sure that kernel maintainers would love you for that.

Btw, all this is coming from someone who really has no love for red hat, nor fedora. On other hand, I do not hate them either.

Last edited by dejank; 06-19-2017 at 09:29 AM.
 
Old 06-19-2017, 03:19 PM   #37
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 649

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dejank View Post
No, it does not mean that. All it means is that that specific command can be used by unprivileged user. And in your case, it simply means that mint package manager will check for updates. He can not install new packages, nor change system in any way except in what is allowed to him by default. Linux by it's nature is very secure and restrictive in what unprivileged users can, or can not do. Policy kit agent ( that pkexec thingy is just part of it ) is way to give unprivileged users some things that you can expect that every user on desktop/laptop should be able to do. Like, for example, logging into wifi network, automatically mounting usb/dvd... While that thing you encounter with synaptic may seem annoying, it is ok as long as other users do not have your password. And there is way to turn it off, though I do not have time now to bother with it. Would require lots of time investment in learning to write and edit various policy kit files. But it is on my very long to do list :P

However, if you would like to spend some time to learn more about polkit, there is good read about it here: https://wiki.archlinux.org/index.php/Polkit
Oh I see. Thank you for clarifying!
 
Old 06-19-2017, 03:26 PM   #38
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 649

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Turbocapitalist View Post
Which can all be managed in a simpler, clearer manner using sudo. The syntax for sudoers is just EBNF and easy to learn if not already familiar. . . . keep in mind there is no "sudo password" just accounts that are authorized by PolicyKit (pkexec) to do an end-run around your settings.
See, that really appalls me. I don't want a system that, intentionally or not, creates an "end-run" around my specifically defined settings.

Do any linux distos NOT use pkexec / policykit?
 
Old 06-19-2017, 03:30 PM   #39
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 649

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Turbocapitalist View Post
And yet everything Red Hat has been doing in recent years has been adding to the complexity and difficulty of Linux and so increasing barriers to use. And thus our costs of using Linux in general increase as a result. While you are right d-bus cannot be made simple, it is only one approach to a set of problems. From here d-bus looks like an unnecessarily complex and ill-scoped approach, and thus wrong.

Again, about technical advice, see the files in the directory /var/lib/polkit-1/localauthority/10-vendor.d/ and work out an override to place in /var/lib/polkit-1/localauthority/50-local.d/ mentioned already back in post #21 From the symptoms, the problem is with pkexec (PolicyKit) and not PAM.
Turbocapitalist - Are those links above what I should examine to limit pkexec / policykit?

Thank you again.
 
Old 06-19-2017, 03:45 PM   #40
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
See, that really appalls me. I don't want a system that, intentionally or not, creates an "end-run" around my specifically defined settings.
No, it does not allow end-run around your specifically defined settings. It just allows some normal stuff to be executed by non privileged users. Like automounting of DVD and USB, or using wifi.

Quote:
Do any linux distos NOT use pkexec / policykit?
Of those that do not, Slackware would be your best bet. But expect much more manual work.

If that synaptic thing really bothers you that much, there is one simple solution that you could do, now that I think of it. When you launch synaptic from command line, it should start one for unprivileged users. But, when you click on icon of synaptic in menu, it will launch /usr/bin/synaptic-pkexec in Debian. It might be in some other place on Mint. Use which synaptic-pkexec to find out. When you do, you can change it's permissions so only root can run it. So sudo chmod o-x /usr/bin/synaptic-pkexec should prevent those without sudo privileges to launch it.
 
Old 06-20-2017, 01:11 PM   #41
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 649

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dejank View Post
No, it does not allow end-run around your specifically defined settings. It just allows some normal stuff to be executed by non privileged users. Like automounting of DVD and USB, or using wifi.



Of those that do not, Slackware would be your best bet. But expect much more manual work.

If that synaptic thing really bothers you that much, there is one simple solution that you could do, now that I think of it. When you launch synaptic from command line, it should start one for unprivileged users. But, when you click on icon of synaptic in menu, it will launch /usr/bin/synaptic-pkexec in Debian. It might be in some other place on Mint. Use which synaptic-pkexec to find out. When you do, you can change it's permissions so only root can run it. So sudo chmod o-x /usr/bin/synaptic-pkexec should prevent those without sudo privileges to launch it.
dejank - I am grateful for the suggestion and will consider it, but I noticed you referred to launching Synaptic via command line. What about launching Synaptic via GUI input? GUI is what I normally use and it says "Superuser" when I launch it via GUI. Is it possible to restrict this behaviour while using GUI too?
 
Old 06-20-2017, 01:14 PM   #42
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
Quote:
Originally Posted by MBA Whore View Post
Turbocapitalist - Are those links above what I should examine to limit pkexec / policykit?
Yes, but pkexec / policykit does have a bit of a learning curve. The Arch link that dejank posted is also helpful in that regard.
 
Old 06-20-2017, 02:02 PM   #43
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
dejank - I am grateful for the suggestion and will consider it, but I noticed you referred to launching Synaptic via command line. What about launching Synaptic via GUI input? GUI is what I normally use and it says "Superuser" when I launch it via GUI. Is it possible to restrict this behaviour while using GUI too?
When you launch it via GUI, it opens /usr/bin/synaptic-pkexec. So, you could either try to find path it uses to do that, symlink probably and change it to open /usr/bin/synaptic. Or, do as I've suggested you and than non privileged users will not be able to open it at all via gui, but will be able to open synaptic in terminal ( by simply typing synaptic ), but that one will not ask them for password and will run in unprivileged more ( will be able to browse packages, but not to update and install ). And when you want to launch it, open terminal type sudo synaptic, which will open it with root privileges. If you want to change default launch of synaptic, you could probably do that to, by editing file /usr/share/menu/synaptic and changing this line:

Code:
command="x-terminal-emulator -e synaptic-pkexec"
to this line:

Code:
command="x-terminal-emulator -e synaptic"
It could be located somewhere else, I'm looking this on Debian and you are on Mint. But that should give you idea what to do and should probably be solution to launch Synaptic in GUI. But, when you do that, it will run in unprivileged mode. And you will have to use again terminal and sudo synaptic to run it as root. So, as I've already told you, if you want to turn policykit stuff off, you can. But then you will have to do more manual work. Synaptic-pkexec exists to make it easier, and if you have good password you do not have to worry about it. Failed password attempts can be tracked, and number of failed password attempts can be restricted.
 
Old 06-21-2017, 07:11 AM   #44
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
There is a way to bypass polkit described here.
 
Old 06-21-2017, 08:17 AM   #45
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by TxLonghorn View Post
There is a way to bypass polkit described here.
Nope, that explains how to make polkit not require password. It is same as running as root all the time, for all users. And that is certainly not something that OP would like.
 
  


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
[SOLVED] Restricting shell commands for sudo jlinkels Linux - Security 2 05-01-2012 01:18 PM
howto log usage of shared account (root account) after `sudo su -` drManhattan Linux - Server 5 09-30-2011 07:48 AM
Restricting Sudo Access carlosinfl Linux - Security 2 08-11-2011 04:48 PM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 12:51 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
Open Source Consulting | Domain Registration