Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: User Privilege?

  1. #11
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    I have created a new user called test with the password test - using the terminal. I try and launch gparted and the authentication window comes up asking me for the password for liz (althoughI'm logged into the new user test account. I can only launch gparted using the liz password, not test. If I try and add test to the sudoers group I get:

    Code:
    test@lizubuntu:~$ sudo usermod -aG sudo test
    [sudo] password for test: 
    test is not in the sudoers file.  This incident will be reported.
    test@lizubuntu:~$ sudo usermod -aG sudo test
    [sudo] password for test: 
    Sorry, try again.
    [sudo] password for test:
    The first attempt above I use test as the password - the second attempt I used my wife's password.

  2. #12
    Join Date
    May 2013
    Location
    Galiza
    Beans
    4,010
    Distro
    Ubuntu

    Re: Use Privilege?

    Only the user already in sudoers can add another with the same level of permissions.

  3. #13
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Use Privilege?

    We're trying to figure out if this is really a sudo issue or a pkexec issue or an environment issue.
    I never use the GUI for software updates and rarely use any menu, so I don't have any clue which programs in the menus use sudo/pkexec in their .desktop files. I suppose a quick grep would find those.

    Code:
    tf@hadar:/var/lib/menu-xdg/applications/menu-xdg$ egrep pkexec *
    X-Debian-Applications-System-Package-Management-synaptic_package_manager.desktop:Exec=x-terminal-emulator -e synaptic-pkexec
    
    tf@hadar:/var/lib/menu-xdg/applications/menu-xdg$ which synaptic-pkexec
    /usr/bin/synaptic-pkexec
    
    tf@hadar:/var/lib/menu-xdg/applications/menu-xdg$ file /usr/bin/synaptic-pkexec
    /usr/bin/synaptic-pkexec: POSIX shell script, ASCII text executable
    
    tf@hadar:/var/lib/menu-xdg/applications/menu-xdg$ more /usr/bin/synaptic-pkexec 
    #!/bin/sh
    pkexec "/usr/sbin/synaptic" "$@"
    I looked at the script: /usr/sbin/gparted ... and it has
    Code:
    pkexec --disable-internal-agent '/usr/sbin/gparted' "$@"
    inside it. Eventually, it calls gpartedbin as the real program.

    What does all this mean? It means that gparted uses pkexec unless it is called by itself using pkexec. Also, in the script it does to X/11 xhost + magic to ensure it always works, then it cleans up itself after. Nice of them to do that to avoid hassles that some other programs (cough ... every GUI file manager) will likely see.
    Last edited by TheFu; 3 Weeks Ago at 05:36 PM.

  4. #14
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    Code:
    liz@lizubuntu:~$ /var/lib/menu-xdg/applications/menu-xdg$ egrep pkexec *
    bash: /var/lib/menu-xdg/applications/menu-xdg$: No such file or directory
    liz@lizubuntu:~$ X-Debian-Applications-System-Package-Management-synaptic_package_manager.desktop:Exec=x-terminal-emulator -e synaptic-pkexec
    X-Debian-Applications-System-Package-Management-synaptic_package_manager.desktop:Exec=x-terminal-emulator: command not found
    liz@lizubuntu:~$ /var/lib/menu-xdg/applications/menu-xdg$ which synaptic-pkexec
    bash: /var/lib/menu-xdg/applications/menu-xdg$: No such file or directory
    liz@lizubuntu:~$ /usr/bin/synaptic-pkexec
    ==== AUTHENTICATING FOR com.ubuntu.pkexec.synaptic ===
    Authentication is required to run the Synaptic Package Manager
    Authenticating as: liz,,, (liz)
    Password: 
    polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
    ==== AUTHENTICATION FAILED ===
    Error executing command as another user: Not authorized
    
    This incident has been reported.
    liz@lizubuntu:~$
    Also - in /usr/sbin/gparted I have the command

    Code:
    pkexec --disable-internal-agent '/usr/sbin/gparted' "$@"
    	status=$?

  5. #15
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    Sorry didn't really understand what to do. I have the same output as your good self:

    Code:
    liz@lizubuntu:~$ cd /var/lib/menu-xdg/applications/menu-xdg
    liz@lizubuntu:/var/lib/menu-xdg/applications/menu-xdg$ egrep pkexec *
    X-Debian-Applications-System-Package-Management-synaptic_package_manager.desktop:Exec=x-terminal-emulator -e synaptic-pkexec
    liz@lizubuntu:/var/lib/menu-xdg/applications/menu-xdg$ which synaptic-pkexec
    /usr/bin/synaptic-pkexec
    liz@lizubuntu:/var/lib/menu-xdg/applications/menu-xdg$ file /usr/bin/synaptic-pkexec
    /usr/bin/synaptic-pkexec: POSIX shell script, ASCII text executable
    liz@lizubuntu:/var/lib/menu-xdg/applications/menu-xdg$ more /usr/bin/synaptic-pkexec
    #!/bin/sh
    pkexec "/usr/sbin/synaptic" "$@"
    And as in #14 I also appear to have the same coding in the /usr/sbin/gparted scipt.

  6. #16
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,998
    Distro
    Ubuntu

    Re: Use Privilege?

    polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Errorrg.freedesktop.PolicyKit1.Error.Failed: No session for cookie
    This might mean the polkit agent isn't running, or something's not running properly.
    Check if it's enabled in autostart
    Code:
    cat /etc/xdg/autostart/polkit-mate-authentication-agent-1.desktop
    What does polkit's systemd status show:
    Code:
    systemctl status polkit
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  7. #17
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    Code:
    liz@lizubuntu:~$ cat /etc/xdg/autostart/polkit-mate-authentication-agent-1.desktop
    [Desktop Entry]
    Name=PolicyKit Authentication Agent
    Name[am]=የ አሰራር ጥቅል ማረጋገጫ ወኪል
    Name[ar]=مدير الاستيثاق PolicyKit
    Name[be]=PolicyKit, агент аўтэнтыфікацыі
    Name[bg]=Програма за идентификация PolicyKit
    Name[bn_IN]=PolicyKit অনুমোদনের এজেন্ট
    Name[ca]=Agent d'autenticació PolicyKit
    Name[ca@valencia]=Agent d'autenticació PolicyKit
    Name[cmn]=PolicyKit 驗證代理程式
    Name[cs]=Ověřovací agent PolicyKit
    Name[da]=Godkendelsesprogrammet PolicyKit
    Name[de]=PolicyKit-Legitimationsagent
    Name[el]=Πράκτορας πιστοποίησης PolicyKit
    Name[en_AU]=PolicyKit Authentication Agent
    Name[en_GB]=PolicyKit Authentication Agent
    Name[es]=Agente de autenticación de PolicyKit
    Name[es_CO]=Agente de autenticación PolicyKit
    Name[et]=Autentimisagent PolicyKit
    Name[eu]=PolicyKit autentifikatzeko agentea
    Name[fi]=PolicytKit-tunnistautumisohjelma
    Name[fr]=Agent d'authentification de PolicyKit
    Name[gl]=Axente de autenticación PolicyKit
    Name[gu]=PolicyKit સત્તાધિકરણ એજન્ટ
    Name[he]=סוכן האימון PolicyKit
    Name[hi]=PolicyKit प्रमाणीकरण प्रतिनिधि
    Name[hr]=Programski izvršitelj pravila ovjere
    Name[hu]=PolicyKit hitelesítési ügynök
    Name[hy]=PolicyKit Նույնականացման գործակալը
    Name[id]=PolicyKit Authentication Agent
    Name[is]=PolicyKit auđkenningarţjónn
    Name[it]=Agente di autenticazione per PolicyKit
    Name[ja]=PolicyKit 認証エージェント
    Name[kk]=PolicyKit аутентификация агенті
    Name[kn]=PolicyKit ದೃಢೀಕರಣ ಮಧ್ಯವರ್ತಿ
    Name[ko]=PolicyKit 인증 에이전트
    Name[lt]=PolicyKit tapatybės nustatymo agentas
    Name[lv]=PolicyKot Apliecinājuma Aģents
    Name[ml]=പോളിസിക്കിറ്റ് ഓഥന്റിക്കേഷന്* ഏജന്റ്
    Name[mr]=PolicyKit ऑथेंटीकेशन एजेंट
    Name[ms]=Ejen Pengesahihan PolicyKit
    Name[nb]=Agent for fodkjennelsesprogrammet PolicyKit
    Name[nl]=PolicyKit Authenticatie-agent
    Name[oc]=Agent d'autentificacion de PolicyKit
    Name[or]=PolicyKit ବୈଧିକରଣ ସଦସ୍ୟ
    Name[pa]=ਪਾਲਸੀਕਿੱਟ ਪਰਮਾਣਕਿਤਾ ਏਜੰਟ
    Name[pl]=Agent uwierzytelniania PolicyKit
    Name[pt]=Agente de Autenticaçăo PolicyKit
    Name[pt_BR]=Agente de autenticaçăo PolicyKit
    Name[ro]=Agent de autentificare PolicyKit
    Name[ru]=Агент аутентификации PolicyKit
    Name[sk]=Agent PolicyKit na overovanie totožnosti
    Name[sl]=Posrednik overjanja PolicyKit
    Name[sr]=Агент потврђивања идентитета Прибор политике
    Name[sv]=Autentiseringsagent för PolicyKit
    Name[ta]=PolicyKit அங்கீகார முகவர்
    Name[te]=పాలసీకిట్ ధృవీకరణ ప్రతినిధి
    Name[th]=ตัวกลางสำหรับยืนยันตัวบุคคล PolicyKit
    Name[tr]=PolicyKit Kimlik Doğrulama Aracı
    Name[uk]=Агент розпізнання PolicyKit
    Name[ur]=پالیسی کِٹ PolicyKit توثیقی ایجنٹ
    Name[vi]=PolicyKit Authentication Agent
    Name[zh_CN]=PolicyKit 认证代理
    Name[zh_HK]=PolicyKit 驗證代理程式
    Name[zh_TW]=PolicyKit 驗證代理程式
    Comment=PolicyKit Authentication Agent for the MATE Desktop
    Comment[am]=የ አሰራር ጥቅል ማረጋገጫ ወኪል ለ ሜት ዴስክቶፕ
    Comment[ar]=عميل الاستيثاق PolicyKit لسطح مكتب متّة
    Comment[be]=PolicyKit, агент аўтэнтыфікацыі для асяроддзя MATE
    Comment[bg]=Програма за идентификация PolicyKit за MATE
    Comment[ca]=Agent d'autenticació PolicyKit per a l'escriptori MATE
    Comment[ca@valencia]=Agent d'autenticació PolicyKit per a l'escriptori MATE
    Comment[cs]=Ověřovací agent PolicyKit pro MATE Desktop 
    Comment[da]=Godkendelsesprogrammet PolicyKit for MATE-skrivebordet
    Comment[de]=PolicyKit-Legitimationsagent für die MATE-Arbeitsumgebung
    Comment[el]=Πράκτορας πιστοποίησης PolicyKit για το MATE Desktop
    Comment[en_AU]=PolicyKit Authentication Agent for the MATE Desktop
    Comment[en_GB]=PolicyKit Authentication Agent for the MATE Desktop
    Comment[es]=Agente de autenticación de PolicyKit para escritorio MATE
    Comment[es_CO]=Agente de autenticación PolicyKit para el entorno MATE
    Comment[et]=MATE töölaua autentimisagent PolicyKit
    Comment[fi]=PolicyKit-tunnistautumisagentti MATE-työpöydälle
    Comment[fr]=Agent d'authentification PolicyKit pour MATE Desktop
    Comment[gl]=Axente de autenticación PolicyKit para o escritorio MATE
    Comment[he]=סוכן האימון PolicyKit עבור שולחן העבודה MATE
    Comment[hi]=माटे डेस्कटॉप के लिए पोलिसीकिट प्रमाणीकरण घटक
    Comment[hr]=Programski izvršitelj pravila ovjere za radno okruženje MATE
    Comment[hu]=PolicyKit hitelesítési ügynök a MATE Desktophoz
    Comment[hy]=PolicyKit Նույնականացման գործակալը MATE աշխատանքային սեղանի համար
    Comment[id]=Agen Autentikasi PolicyKit untuk MATE Desktop
    Comment[is]=PolicyKit auđkenningarţjónn fyrir MATE-skjáborđiđ
    Comment[it]=Agente di autenticazione per PolicyKit di MATE Desktop
    Comment[ja]=PolicyKit 認証エージェント
    Comment[kk]=MATE жұмыс үстелі үшін PolicyKit аутентификация агенті
    Comment[ko]=마테 데스크톱용 정책키트 인증 에이전트
    Comment[lt]=PolicyKit tapatybės nustatymo agentas MATE darbalaukiui
    Comment[mr]=MATE डेस्कटाॅपसाठी PolicyKit ऑथेंटीकेशन एजेंट
    Comment[ms]=Ejen pengesahihan PolicyKit untuk Desktop MATE
    Comment[nb]=Godkjennelsesprogrammet PolicyKit for MATE-skrivebordet
    Comment[nl]=PolicyKit Authenticatie-agent voor de MATE-werkomgeving
    Comment[oc]=Agent d'autentificacion PolicyKit per MATE Desktop
    Comment[pl]=Agent uwierzytelniania PolicyKit dla MATE
    Comment[pt]=Agente de Autenticaçăo PolicyKit do Ambiente MATE
    Comment[pt_BR]=Agente de autenticaçăo PolicyKit para o ambiente de trabalho MATE
    Comment[ro]=Agent de autentificare PolicyKit
    Comment[ru]=Агент аутентификации PolicyKit для рабочей среды MATE
    Comment[sk]=PolicyKit Authentication Agent pre MATE Desktop
    Comment[sl]=Posrednik overitve PolicyKit za namizje MATE
    Comment[sr]=Прибор политике је агент за потврђивање идентитета за Мејтову радну површ
    Comment[sv]=PolicyKit autentiseringsagent för MATE skrivbordsmiljön
    Comment[th]=ตัวกลางสำหรับยืนยันตัวบุคคล PolicyKit สำหรับพื้นโต๊ะของ MATE
    Comment[tr]=MATE Masaüstü için PolicyKit Kimlik Doğrulama Aracı
    Comment[uk]=Агент розпізнання PolicyKit для стільниці MATE
    Comment[vi]=PolicyKit Authentication Agent cho môi trường MATE
    Comment[zh_CN]=MATE 桌面的 PolicyKit 认证代理
    Comment[zh_TW]=MATE 桌面環境的 PolicyKit 驗證代理程式
    Exec=/usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1
    Terminal=false
    Type=Application
    Categories=
    NoDisplay=true
    OnlyShowIn=MATE;
    X-MATE-AutoRestart=true
    and

    Code:
    liz@lizubuntu:~$ systemctl status polkit
    ● polkit.service - Authorization Manager
       Loaded: loaded (/lib/systemd/system/polkit.service; static; vendor preset: en
       Active: active (running) since Tue 2021-04-13 20:54:59 BST; 4min 1s ago
         Docs: man:polkit(8)
     Main PID: 856 (polkitd)
        Tasks: 3 (limit: 3982)
       CGroup: /system.slice/polkit.service
               └─856 /usr/lib/policykit-1/polkitd --no-debug
    
    Apr 13 20:54:59 lizubuntu systemd[1]: Starting Authorization Manager...
    Apr 13 20:54:59 lizubuntu polkitd[856]: started daemon version 0.105 using autho
    Apr 13 20:54:59 lizubuntu systemd[1]: Started Authorization Manager.

  8. #18
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    Slight difference to my machine but I'm on 20.04

  9. #19
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,998
    Distro
    Ubuntu

    Re: Use Privilege?

    Was that the full output for the status command?
    Seems to be missing the crucial last line,
    which should show what registered authentication agent is in use.
    If you run the Exec command from the autostart desktop file what happens:
    Code:
    /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  10. #20
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,615
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Use Privilege?

    Sorry I am not sure what you want me to do - I do not understand the last sentence, what is the autostart desktop file?

    When I run systemctl status polkit (from a terminal on my Desktop) ON MY MACHINE the last line is:


    Code:
    Apr 14 06:58:28 dadubuntu polkitd(authority=local)[658]: Registered Authentication Agent for unix-session:c1 (system bus name :1.57 [/usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1], object path /org/mate/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8)
    When I run the status command on my wife's machine there is no such line - so the output in #17 was correct. I have run the command on her machine a number of times - she does not have a last line like mine above.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •