Score:0

How to get GNOME to stop asking for a password everytime I insert a dvd

cn flag

Hello I set up a ubuntu server (22.04.1) with plex running and gnome (42.4)

This is working really well. However, everytime I put a dvd in, it asks me for a password. it is driving me crazy. The user logged in is listed as a administrator.

Any idea how to turn that off?

Chris

Score:0
cn flag

You first need to add your user to the cdrom group with usermod -G cdrom $USER.
The polkit rule below allows users in the cdrom group to mount CD/DVD.

# cat /etc/polkit-1/rules.d/01-dvd.rules
/* Allow members of the cdrom group to mount /dev/sr[0] devices */
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount")
    {
        var device = action.lookup("device");
        if (device === "/dev/sr0")
        {
            if (subject.isInGroup("cdrom"))
            {
                return polkit.Result.YES;
            } else {
                return polkit.Result.NO;
            }
        }
    }
});

To test this rule:

  • create the rule file /etc/polkit-1/rules.d/01-dvd.rules
  • restart the Polkit service: systemctl restart polkit.service
  • log off and on again
  • insert CD/DVD

More information in this link.

cb49747 avatar
cn flag
This worked. Thank you so much.
George avatar
cn flag
I'm glad this worked. Please upvote the answer and mark it as a solution. Thanks.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.