Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-06 Thread James Hogarth
On 2 February 2018 at 18:13,   wrote:
> Felipe Westfields wrote:
>> I would like to be able to allow regular users that don't have admin
>> privileges to be able to reboot their workstation. (they're software
>> developers so rebooting their workstation doesn't affect anybody else)
>>
>> I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
>> root:users and permissions to 550, but that didn't work - it's still
>> asking
>> for root privileges.
>>
>> Possibly the problem might be that there's centralized LDAP
>> authentication, not local, so the changes I made only apply to
>> local accounts?
>>
>> Any suggestions?
>
> Um, I take it that a three-finger kill doesn't work?
>
>mark
>

You;ll want to look at polkit configuration as that's what is used by
systemd, and by gnome as a result, to determine what actions are
permitted

https://www.hogarthuk.com/?q=node/10
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread m . roth
Felipe Westfields wrote:
> I would like to be able to allow regular users that don't have admin
> privileges to be able to reboot their workstation. (they're software
> developers so rebooting their workstation doesn't affect anybody else)
>
> I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
> root:users and permissions to 550, but that didn't work - it's still
> asking
> for root privileges.
>
> Possibly the problem might be that there's centralized LDAP
> authentication, not local, so the changes I made only apply to
> local accounts?
>
> Any suggestions?

Um, I take it that a three-finger kill doesn't work?

   mark

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Marcin Trendota
W dniu 02.02.2018 o 18:27, Felipe Westfields pisze:
> That seems to have worked on my own test account - I applied it to the user
> having the issue and asked for his feedback when he gets a chance.
> Thanks!
> On Fri, Feb 2, 2018 at 11:40 AM, Darr247  wrote:
>> Did you try adding
>> UserName ALL= NOPASSWD: /sbin/reboot
>> As the last line of their /etc/sudoers files?
>> (replacing UserName with their actual user name, of course.)
>> That should grant them root access to only the /sbin/reboot command (add
>> more commands using comma delimiting).


It may be more appropriate to place this line in separate file under
/etc/sudoers.d/

-- 
MoonWolf

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Felipe Westfields
That seems to have worked on my own test account - I applied it to the user
having the issue and asked for his feedback when he gets a chance.

Thanks!

On Fri, Feb 2, 2018 at 11:40 AM, Darr247  wrote:

> Did you try adding
>
> UserName ALL= NOPASSWD: /sbin/reboot
>
> As the last line of their /etc/sudoers files?
> (replacing UserName with their actual user name, of course.)
>
> That should grant them root access to only the /sbin/reboot command (add
> more commands using comma delimiting).
>
> Then they just run
> $ sudo reboot
>
>
> If you want to require they enter their own password before rebooting, use
> the line
>
> UserName ALL=/sbin/reboot
>
> Instead.
>
> Use of sudo is recorded in /var/log/secure, if I recall correctly.
>
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Valeri Galtsev



On 02/02/18 10:09, Felipe Westfields wrote:

I would like to be able to allow regular users that don't have admin
privileges to be able to reboot their workstation. (they're software
developers so rebooting their workstation doesn't affect anybody else)

I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
root:users and permissions to 550, but that didn't work - it's still asking
for root privileges.

Possibly the problem might be that there's centralized LDAP authentication,
not local, so the changes I made only apply to local accounts?

Any suggestions?


If they are local users (sitting in front of that computer), they will 
be able to use the commands


shutdown
reboot
poweroff

without any need of special privileges, which tells RedHat and CentOS 
apart from majority of Linuxes. This is incredibly logical (Thanks, 
RedHat!), as local user can just press power button, or yank AC cord.


To allow remote users reboot machine you can allow them execute some 
commands via sudo , like:


sudo reboot

Command sudo means Substitute User DO; when username of substitute user 
is not mentioned in command user "root: is used as substitute user, this 
is where misinterpreting the command as "super user do" originates, and 
the last is wrong. Do "man visudo", "man sudo", to learn details.


Incidentally, rebooting machine is rather big deal, if that is used to 
resolve some trouble happening every so often, I would rather look into 
fixing the cause of that trouble.


Valeri



FW
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos



--

Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Tate Belden
Personally, this is what I'd use sudo for.

You can configure sudo to allow only certain commands with or without a
password. Not a lot of detail, but you can either require or skip the
password. And, instead of individuals - you can use groups. If you look
through the soders file, you'll see how it's doen.

This very brief article goes into a limited how-to:

http://www.atrixnet.com/allow-an-unprivileged-user-to-run-a-certain-command-with-sudo/

On Fri, Feb 2, 2018 at 9:09 AM, Felipe Westfields <
felipe.westfie...@gmail.com> wrote:

> I would like to be able to allow regular users that don't have admin
> privileges to be able to reboot their workstation. (they're software
> developers so rebooting their workstation doesn't affect anybody else)
>
> I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
> root:users and permissions to 550, but that didn't work - it's still asking
> for root privileges.
>
> Possibly the problem might be that there's centralized LDAP authentication,
> not local, so the changes I made only apply to local accounts?
>
> Any suggestions?
>
> FW
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
>



-- 
Natrona County Beekeepers 
Casper Amateur Radio Club 

By sending an email to or replying in any way to ANY of my addresses,
numbers, comments or messages, you are agreeing that:
1. I am, by definition, "the intended recipient" - in spite of and
regardless of your intent, real or imaginary.
2. If you need to know that you know who is receiving your communications
and must also be able to verify they were not tampered with in any way,
while en route as well as verify receipt (but not comprehension), you must
use PKI and have a verified Public Key published in an accessible location.
NOTE: if your PKI Public Key is not signed by anyone I recognize, it will
not be trusted. Unless I choose otherwise.
2. All information in any received communication is mine to do with as I
see fit. I will make such financial gain, profit, political mileage, social
satire, public value or jokes - as it lends itself and as I choose. In
particular, I may quote it on usenet, IRC, SMS and/or future SMTP
communications, regardless of SSL or TLS implementation, not inclusive.
3. I may take the contents of your messages as representing the views of
your company, country or agency. Particularly if you've used a TLD owned by
or under control of said entity.
4. This agreement - now that you've read this far - is now a contract and
absolutely overrides any disclaimer or statement of confidentiality that
may or may not be included, implied or missing in any of your messages.
Especially as such things are meaningless, pointless and carry no weight,
authority or validity, be they mass, legal or emotional, in spite of what
your cousin said.
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Darr247
Did you try adding

UserName ALL= NOPASSWD: /sbin/reboot

As the last line of their /etc/sudoers files?
(replacing UserName with their actual user name, of course.)

That should grant them root access to only the /sbin/reboot command (add
more commands using comma delimiting).

Then they just run
$ sudo reboot


If you want to require they enter their own password before rebooting, use
the line

UserName ALL=/sbin/reboot

Instead.

Use of sudo is recorded in /var/log/secure, if I recall correctly.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Allowing non-root users to reboot a workstation

2018-02-02 Thread Felipe Westfields
I would like to be able to allow regular users that don't have admin
privileges to be able to reboot their workstation. (they're software
developers so rebooting their workstation doesn't affect anybody else)

I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
root:users and permissions to 550, but that didn't work - it's still asking
for root privileges.

Possibly the problem might be that there's centralized LDAP authentication,
not local, so the changes I made only apply to local accounts?

Any suggestions?

FW
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos