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

RFE: persistence of rhproxy after logging out #16

Open
RadekBiba opened this issue Oct 25, 2024 · 2 comments
Open

RFE: persistence of rhproxy after logging out #16

RadekBiba opened this issue Oct 25, 2024 · 2 comments

Comments

@RadekBiba
Copy link

As a non-root user who launched rhproxy in my login shell, I can currently only run rhproxy while I'm the login shell is running. The service gets killed soon after I log out.

Please enhance the rhproxy installation by allowing the service to survive logging out. To achieve that, Alberto mentioned the following command:

$ loginctl enable-linger
@abellotti
Copy link
Collaborator

I just created a simple user (not a member of wheel) and run without the user I got the following:

[aab@aab-dsc ~]$ loginctl enable-linger 
==== AUTHENTICATING FOR org.freedesktop.login1.set-user-linger ====
Authentication is required to run programs as a non-logged-in user.
Multiple identities can be used for authentication:
 1.  Alberto Bellotti (abellotti)
 2.  Discovery Admin (dscadmin)
Choose identity to authenticate as (1-2):

Whereas running it with the user worked fine (and not needing sudo either).

[aab@aab-dsc ~]$ loginctl enable-linger aab
[aab@aab-dsc ~]$ loginctl user-status aab
aab (1003)
           Since: Fri 2024-10-25 13:01:24 EDT; 1min 30s ago
           State: lingering
          Linger: yes
            Unit: user-1003.slice
                  └─[email protected]
                    └─init.scope
                      ├─233846 /usr/lib/systemd/systemd --user
                      └─233848 "(sd-pam)"
[aab@aab-dsc ~]$ 

For the rhproxy helper, I'll go ahead and add the following for rhproxy install

$ loginctl enable-linger $USER

and the following for rhproxy uninstall

$ loginctl disable-linger $USER

@abellotti
Copy link
Collaborator

actually loginctl enable-linger and loginctl disable-linger also work without $USER if logging in directly to the box. If one su - to the user from another account, the $USER is needed. So specifying $USER would handle both cases.

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

No branches or pull requests

2 participants