LinuxQuestions.org
Visit Jeremy's Blog.
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 Yesterday, 03:50 AM   #16
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,803

Rep: Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202

A time limit (lifecycle limit) is a good idea!
Missing in sudo.
How about Linux polkit, does it support expiration?
 
Old Yesterday, 04:37 AM   #17
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,595
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
Quote:
Originally Posted by MadeInGermany View Post
How about Linux polkit, does it support expiration?
It supports it but I think it's up to the sysadmin whether the authentication expires for a particular case or not.

I was under the impression that sudo passwords expire after a few minutes unless reused. Is that no longer the case?

Last edited by hazel; Yesterday at 04:39 AM.
 
Old Yesterday, 04:40 AM   #18
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,888

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
Quote:
Originally Posted by hazel View Post
It supports it but I think it's up to the sysadmin whether the authentication expires for a particular case or not.

I was under the impression that sudo passwords expire after a few minutes unless reused. Is that no longer the case?
it is a different case. The password itself will be completely useless, expired. Not the current session.
 
Old Yesterday, 04:41 AM   #19
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725
Quote:
Originally Posted by MadeInGermany View Post
A time limit (lifecycle limit) is a good idea!
Missing in sudo.
How about Linux polkit, does it support expiration?
Authorization expires in sudo, see the timestamp_timeout and timeout_spec options. But do you mean limiting authorization to particular hours in the day? Polkit does not have the granularity to be other than a dangerous backdoor at the moment.
 
Old Yesterday, 05:33 AM   #20
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,803

Rep: Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202
I don't mean a authentication caching time.
And not a work hours restriction.

Following scenario:
in an enterprise environment there is a security policy to time-limit each granted privilege (sudo or RBAC), say from 1 day up to 1 year.

Entries in sudoers do not have an end date.
So a complex tool is required that tracks the entries and removes them if expired.
 
Old Yesterday, 05:40 AM   #21
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725
I'd expect that you'd do that with groups in /etc/sudoers and then add the account to the group for a while, removing the account from that group when their time is up.
 
Old Yesterday, 05:53 AM   #22
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,888

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
Quote:
Originally Posted by Turbocapitalist View Post
I'd expect that you'd do that with groups in /etc/sudoers and then add the account to the group for a while, removing the account from that group when their time is up.
that is not the same. A user may have permission to execute one or more commands, and the permission may expire only on some, not all.
 
Old Yesterday, 06:27 AM   #23
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725Reputation: 3725
Quote:
Originally Posted by pan64 View Post
that is not the same. A user may have permission to execute one or more commands, and the permission may expire only on some, not all.
Though it is also likely I am not seeing the whole picture, I would still see that as an extension of group access. e.g.

Code:
Cmnd_Alias WEB = /usr/sbin/apache2ctl graceful, /usr/sbin/apache2ctl start, /usr/sbin/apache2ctl stop
. . .
%web-01 ALL=(root:root) WEB
%db-02 ALL=(root:root) ...
%user-03 ALL=(root:root) ...
. . .
Then

Code:
echo 'sed -i.bak -e "s/^%pan64-01/# &/" /etc/sudoers"; \
    gpasswd -d pan64 web-01;' \
        at -t 202405102200
Or something like that.
 
  


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
LXer: The Differences between Su, Sudo Su, Sudo -s and Sudo -i LXer Syndicated Linux News 0 09-15-2022 07:47 PM
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
sudo sudo onthefritz SUSE / openSUSE 4 06-05-2007 02:37 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 02:16 PM

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

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