RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1935261 - [RFE] Enable connecting to WiFI and VPN connections at the GDM login
Summary: [RFE] Enable connecting to WiFI and VPN connections at the GDM login
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gnome-shell
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Florian Müllner
QA Contact: Michael Boisvert
Marek Suchánek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-04 15:02 UTC by Phil Jasbutis
Modified: 2024-12-20 19:43 UTC (History)
9 users (show)

Fixed In Version: gdm-40.0-3.el8, gnome-shell-3.32.2-32.el8
Doc Type: Enhancement
Doc Text:
.You can now connect to network at the login screen With this update, you can now connect to your network and configure certain network options at the GNOME Display Manager (GDM) login screen. As a result, you can log in as an enterprise user whose home directory is stored on a remote server. The login screen supports the following network options: * Wired network * Wireless network, including networks protected by a password * Virtual Private Network (VPN) The login screen cannot open windows for additional network configuration. As a consequence, you cannot use the following network options at the login screen: * Networks that open a captive portal * Modem connections * Wireless networks with enterprise WPA or WPA2 encryption that have not been preconfigured The network options at the login screen are disabled by default. To enable the network settings, use the following procedure: . Create the `/etc/polkit-1/rules.d/org.gnome.gdm.rules` file with the following content: + ---- polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.NetworkManager.network-control" && subject.user == "gdm") { return polkit.Result.YES; } return polkit.Result.NOT_HANDLED; }); ---- . Restart GDM: + ---- # systemctl restart gdm ---- + WARNING: Restarting GDM terminates all your graphical user sessions. . At the login screen, access the network settings in the menu on the right side of the top panel.
Clone Of:
Environment:
Last Closed: 2021-11-09 19:34:12 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4381 0 None None None 2021-11-09 19:34:27 UTC

Description Phil Jasbutis 2021-03-04 15:02:14 UTC
3. What is the nature and description of the request?

- RHEL Workstation running outside enterprise network where auth server and NFS share (for userhomes) are located
- Setting up network and VPN connection (PKI/OTP/RSA) prior login is required to prevent local data or authentication source


4. Why does the customer need this? (List the business requirements here)

- Using local user accounts, local passwords and storing local userdata (home directory) is prohibited by enterprise policies
- enable users work with enterprise login from any location where internet connection is available
- fulfill enterprise compliance and security policies


5. How would the customer like to achieve this? (List the functional requirements here)

- on GDM login screen there should be a possibility to activate a predefined network and VPN connection
- in case the connection requires user input for authentication (Wifi-password, RSA, PKI pin, ...) there should be a dialog
- nm-applet on gdm login screen is available and shows system connections but these can't be enabled/disabled


6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

- on GDM, network connections should be allowed to be enabled/disabled.
- when activating a connection that requires user input (password, PKI pin, ...) there should be an input dialog.
- after required network connection is established, login works as from enterprise network


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

- https://bugzilla.redhat.com/908091


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

- asap


9. Is the sales team involved in this request and do they have any additional input?

- no


10. List any affected packages or components.

-> gdm, gnome-shell, gnome-session, NetworkManager


11. Would the customer be able to assist in testing this functionality if implemented?

-> yes

Comment 10 Michael Boisvert 2021-06-10 00:02:25 UTC
On gdm-40.0-3.el8 and gnome-shell-3.32.2-31.el8, I still see all networking options greyed out at the GDM login screen. Am I missing something?

Comment 11 Florian Müllner 2021-06-10 00:38:29 UTC
Ray and I agreed to be conservative and not change the default behavior. That's why gdm installs a default polkit rule that disables network-configuration for the gdm user. It can be overriden by something like

/etc/polkit-1/rules.d/org.gnome.gdm.rules:
  polkit.addRule(function(action, subject) {
      if (action.id == "org.freedesktop.NetworkManager.network-control" {
          return polkit.Result.YES;
      }

      return polkit.Result.NOT_HANDLED;
  });

Comment 12 Michael Boisvert 2021-06-10 18:21:48 UTC
Ah okay, I understand now but am still having trouble. 

I created a /etc/polkit-1/rules.d/org.gnome.gdm.rules file with the content you suggested with some additions from the git commit as follows:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.NetworkManager.network-control" &&
        subject.user == "@GDM_USERNAME@") {
            return polkit.Result.YES;
    }

    return polkit.Result.NOT_HANDLED;
});

After restarting GDM/rebooting, I still don't have the ability to modify networking settings

Comment 13 Michael Boisvert 2021-06-10 18:30:43 UTC
Jumped the gun here. 

Replacing "@GDM_USERNAME@" with just "gdm" allows network configuration. 

So the content of the .rules file should be as follows:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.NetworkManager.network-control" &&
        subject.user == "gdm") {
            return polkit.Result.YES;
    }

    return polkit.Result.NOT_HANDLED;
});

Comment 14 Florian Müllner 2021-06-10 18:32:25 UTC
(In reply to Michael Boisvert from comment #12)
> Ah okay, I understand now but am still having trouble. 
> 
> I created a /etc/polkit-1/rules.d/org.gnome.gdm.rules file with the content
> you suggested with some additions from the git commit as follows:
> 
> polkit.addRule(function(action, subject) {
>     if (action.id == "org.freedesktop.NetworkManager.network-control" &&
>         subject.user == "@GDM_USERNAME@") {
>             return polkit.Result.YES;
>     }
> 
>     return polkit.Result.NOT_HANDLED;
> });

The file in the git commit is a template, from which the actual rule is generated at build time: @GDM_USERNAME@ is replaced by gdm. The above override literally matches a user called @GDM_USERNAME@, which doesn't exist. It should work oif you replace it with "gdm".

Comment 15 Michael Boisvert 2021-06-10 18:37:34 UTC
(In reply to Florian Müllner from comment #14)
> (In reply to Michael Boisvert from comment #12)
> > Ah okay, I understand now but am still having trouble. 
> > 
> > I created a /etc/polkit-1/rules.d/org.gnome.gdm.rules file with the content
> > you suggested with some additions from the git commit as follows:
> > 
> > polkit.addRule(function(action, subject) {
> >     if (action.id == "org.freedesktop.NetworkManager.network-control" &&
> >         subject.user == "@GDM_USERNAME@") {
> >             return polkit.Result.YES;
> >     }
> > 
> >     return polkit.Result.NOT_HANDLED;
> > });
> 
> The file in the git commit is a template, from which the actual rule is
> generated at build time: @GDM_USERNAME@ is replaced by gdm. The above
> override literally matches a user called @GDM_USERNAME@, which doesn't
> exist. It should work oif you replace it with "gdm".

Thanks for the quick reply, I ended up figuring it out.

Comment 16 Michael Boisvert 2021-06-10 19:57:17 UTC
The next hurdle is that you cannot connect to a VPN. When attempting to connect to a VPN at the login screen, the popup where you input your pin/token never arrives. I imagine its blocked in some way. It is possible to disconnect from the VPN and adjust all WiFi settings though.

Comment 17 Florian Müllner 2021-06-10 21:39:39 UTC
Ah yes, I missed that we disable the component that is responsible for handling network secrets on the login screen. It should work now in gnome-shell-3.32.2-32.el8.

Comment 18 Michael Boisvert 2021-06-11 14:01:16 UTC
Using gdm-40.0-3.el8, gnome-shell-3.32.2-32.el8 and the polkit rule mentioned earlier, you can fully configure your networking needs at the gdm login screen.

Comment 28 errata-xmlrpc 2021-11-09 19:34:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: GNOME security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4381


Note You need to log in before you can comment on or make changes to this bug.