Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Force second device for sudo #223

Open
mcdope opened this issue Jan 9, 2024 · 10 comments
Open

[Feature] Force second device for sudo #223

mcdope opened this issue Jan 9, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mcdope
Copy link
Owner

mcdope commented Jan 9, 2024

Understood

Yes, this is not a bug report / support request

Text

When #31 is done, it would be possible to implement a way to force a second device for sudo usage.

Example usecase: Office, School etc having usb keys for each user. Each user sometimes need to use sudo, like for example installing software. Admin could then visit the users desk, plug the sudo stick in, user runs command(s), admin walks away with his stick again. Or a shared family computer etc.

@mcdope mcdope added enhancement New feature or request research labels Jan 9, 2024
@mcdope mcdope added this to the 1.?.0 milestone Jan 9, 2024
@mcdope mcdope changed the title [Feature] Force second device for sudo (requires #31) [Feature] Force second device for sudo Jul 20, 2024
@mcdope
Copy link
Owner Author

mcdope commented Jul 20, 2024

How to implement:

  • <device> in <user> should have an attribute sudo, if present require this device for su(do) request

todo: check if this should be used for polkit or like that.

@mcdope
Copy link
Owner Author

mcdope commented Jul 23, 2024

Better idea: <option id="sudo_device">DeviceName</option> in <user> or global.

if global it would basically disallow sudo for users not having the sudo device configured though.

@mcdope
Copy link
Owner Author

mcdope commented Jul 23, 2024

Or put a <device> in <service id="sudo"> ?

Guess this is the best idea, because it doesn't restrict the feature to sudo

@mcdope mcdope modified the milestones: 1.?.0, 0.9.0 Aug 2, 2024
@mcdope mcdope removed the research label Aug 2, 2024
@mcdope mcdope self-assigned this Aug 2, 2024
@mcdope
Copy link
Owner Author

mcdope commented Aug 11, 2024

todo:
[ ] Modifiy opts->device_list to have sudo attribute
[ ] Modifiy pusb_device_connected to only iterate devices having the attribute

@v-Nyo
Copy link

v-Nyo commented Dec 28, 2024

What about adding an option to use different config files specified in pam?

@mcdope
Copy link
Owner Author

mcdope commented Jan 11, 2025

What about adding an option to use different config files specified in pam?

Not sure what you mean and how that would affect this feature. Can you elaborate?

@v-Nyo
Copy link

v-Nyo commented Jan 14, 2025

I got the idea from google authenticator where you can have a pam config like this:
auth required pam_google_authenticator.so user=root secret=/path_folder/${USER}

So I though you could specify the config that pam_usb uses like this

@mcdope
Copy link
Owner Author

mcdope commented Jan 14, 2025 via email

@v-Nyo
Copy link

v-Nyo commented Jan 14, 2025

well instead of pam_usb handling which service requires another drive / second drive it would be handled by pam.

I though that this solution might be more secure and simpler. IDK

@mcdope
Copy link
Owner Author

mcdope commented Jan 14, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants