Authentication is needed to run `/bin/csh' as the super user

Hello.

Sometimes I use pkexec to run thunar as root on my FreeBSD 14 (recently upgraded from 13.2),but after the upgrade it does not work anymore :

Code:
marietto@marietto:/usr/home/marietto $ pkexec thunar

==== AUTHENTICATING FOR org.xfce.thunar ====
Authentication is required to run Thunar as root.
Authenticating as: mario (marietto)
** (process:4449): WARNING **: 13:46:43.685: Error reading line from helper: nothing to read
==== AUTHENTICATION FAILED ====
Bus error

even pkexec only gives the same error :

Code:
marietto@marietto:/usr/home/marietto $ pkexec

==== AUTHENTICATING FOR org.freedesktop.policykit.exec
==== Authentication is needed to run `/bin/csh' as the super user
Authenticating as: mario (marietto)
** (process:4300): WARNING **: 12:54:52.939: Error reading line from helper: nothing to read
==== AUTHENTICATION FAILED ====
Bus error

any idea about how to fix it ?
 
Is user "marietto" a group member of "wheel", currently?

Just a possibility, but if the user is created as non-"wheel" primary group and added to wheel by editing /etc/group, mis-merge (mis-edit) could cause the user out of wheel group.

The user attemping to get root privilege is NOT in group "wheel", basically it should be rejected.

I've never used pkexec, but if it acts like sudo, or even su, the same could happen.
 
yes,I've added again marietto to the wheel group,issuing this command :

Code:
pw usermod marietto -G wheel

and following this instructions :


now the message is changed :

Code:
marietto@marietto:/usr/home/marietto/Desktop $ pkexec thunar

==== AUTHENTICATING FOR org.xfce.thunar ====
Authentication is required to run Thunar as root.
Multiple identities can be used for authentication:
 1.  Charlie & (root)
 2.  marietto
Choose identity to authenticate as (1-2): 2

** (process:51714): WARNING **: 17:39:03.436: Error reading line from helper: nothing to read
==== AUTHENTICATION FAILED ====
 
pw usermod marietto -G wheel
Note how this command works. You just replaced all additional groups with a single 'wheel' group. If your user was a member of 'video' for example that would get removed.
Code:
     -G grouplist  Set secondary group memberships for an account.  grouplist
                   is a comma, space, or tab-separated list of group names or
                   group numbers.  The user is added to the groups specified
                   in grouplist, and removed from all groups not specified.
                   The current login session is not affected by group
                   membership changes, which only take effect when the user
                   reconnects.  Note: do not add a user to their primary group
                   with grouplist.

If you want to add a group to user, modify the group instead; pw groupmod wheel -m marietto

Code:
     -m newmembers  Similar to -M, this option allows the addition of existing
                    users to a group without replacing the existing list of
                    members.  Login names or user ids may be used, and
                    duplicate users are silently eliminated.
 
None of your solutions worked....
Code:
marietto@marietto:/usr/home/marietto/Desktop $ pkexec thunar
==== AUTHENTICATING FOR org.xfce.thunar ====
Authentication is required to run Thunar as root.
Authenticating as: mario (marietto)

** (process:4601): WARNING **: 18:51:38.512: Error reading line from helper: nothing to read
==== AUTHENTICATION FAILED ====
Bus error
 
** (process:4601): WARNING **: 18:51:38.512: Error reading line from helper: nothing to read ==== AUTHENTICATION FAILED ==== Bus error
This made me think of mixed-up situation.
Possibly, old helper (not at all sure what actually is) cannot executed properly and passed back nothing required by pkexec.

Do every ports/pkgs updated for 14 properly?
Doesn't required helper left old for 13.2, possibly depends on openssl1.1.1*?
Does the script below (save as whatever a name you want) lists anything old?
Code:
#!/bin/sh

CURVERS=14
TMPLIST=/tmp/pkglist

pkg version -o | cut -f 1 -w > ${TMPLIST}

cat ${TMPLIST} | while read PACKAGE
do
  ARCH=`pkg query %q ${PACKAGE}`
  if [ ${CURVERS} != `echo ${ARCH} | cut -f 2 -d :` ]
  then
    echo Port ${PACKAGE} : ${ARCH}
  fi
done
 
---> Did you enter the root password or the password of your regular user?

I'm using one only password to pass from the regular user to root user. Maybe because I've added the user "marietto" to the wheel group.

Code:
marietto@marietto:/usr/home/marietto/Desktop $ pkexec thunar
==== AUTHENTICATING FOR org.xfce.thunar ====
Authentication is required to run Thunar as root.
Authenticating as: mario (marietto)

** (process:4554): WARNING **: 15:44:31.624: Error reading line from helper: nothing to read
==== AUTHENTICATION FAILED ====
Bus error

(it does not even ask for the password)

and :

Code:
marietto@marietto:/usr/home/marietto/Desktop $ su root thunar
Password:
thunar: No such file or directory.

Code:
# ./check-14-packages
Port devel/libpthread-stubs : FreeBSD:13:*
 
but I also stumbled onto this thread which suggests that using pkexec is not the best idea:

ok. Can you suggest an alternative method ? Actually I've created a desktop file that I have placed on the Desktop and when I need to run thunar as root,I click on top of it. This is the content :

Code:
[Desktop Action open-computer]
Exec=thunar computer:///
Name[it_IT]=Computer
Name=Computer

[Desktop Action open-home]
Exec=thunar %U
Name[it_IT]=Home
Name=Home

[Desktop Action open-trash]
Exec=thunar trash:///
Name[it_IT]=Cestino
Name=Trash

[Desktop Entry]
Actions=open-home;open-computer;open-trash;
Categories=System;Utility;Core;GTK;FileTools;FileManager;
Comment[it_IT]=Esplora il file system con il gestore dei file
Comment=Esplora il file system con il gestore dei file

Exec=pkexec thunar %F
GenericName[it_IT]=Gestore dei file
GenericName=Gestore dei file

Icon=org.xfce.thunar
Keywords[it_IT]=file manager;explorer;finder;browser;folders;directory;directories;partitions;drives;network;devices;rename;move;copy;delete;permissions;home;trash;
Keywords=file manager;explorer;finder;browser;folders;directory;directories;partitions;drives;network;devices;rename;move;copy;delete;permissions;home;trash;

MimeType=inode/directory;
Name[it_IT]=ThunaRoot
Name=ThunaRoot

Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
 
It looks as if you maybe have not reinstalled _all_ packages (and ports) after the upgrade.

what should I do at this point ? I never encountered this scenario. Usually after the upgrade procedure,everything works well. That's the procedure that I've followed to upgrade 13.2 to 14.0 :

Code:
# setenv  EDITOR  /usr/local/bin/nano
# setenv  VISUAL  /usr/local/bin/nano
# cd /usr
# mv src src-old
# git clone https://git.FreeBSD.org/src.git /usr/src
# cd /usr/src
# git checkout releng/14.0
# make -j4 buildworld
# make -j4 kernel
# shutdown -r now
# etcupdate -p
# cd /usr/src
# make installworld
# etcupdate -B
# shutdown -r now
# etcupdate resolve
 
I know,but your idea didn't work. Please read again what happened when I tried :

 
what should I do at this point ? I never encountered this scenario. Usually after the upgrade procedure,everything works well. That's the procedure that I've followed to upgrade 13.2 to 14.0 :

Code:
# setenv  EDITOR  /usr/local/bin/nano
# setenv  VISUAL  /usr/local/bin/nano
# cd /usr
# mv src src-old
# git clone https://git.FreeBSD.org/src.git /usr/src
# cd /usr/src
# git checkout releng/14.0
# make -j4 buildworld
# make -j4 kernel
# shutdown -r now
# etcupdate -p
# cd /usr/src
# make installworld
# etcupdate -B
# shutdown -r now
# etcupdate resolve
Obviously the problem source is: You did not reinstall all packages/ports after the upgrade. At least I miss this step in your step list.
When using packages pkg update && pkg upgrade -f should do the job, ports you need to recompile.
 
Code:
# pkg info polkit

polkit-123_1
Name           : polkit
Version        : 123_1
Installed on   : Sun Dec  3 00:11:17 2023 CET
Origin         : sysutils/polkit
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : sysutils gnome
Licenses       : LGPL20+
Maintainer     : desktop@FreeBSD.org
WWW            : https://gitlab.freedesktop.org/polkit/polkit
Comment        : Framework for controlling access to system-wide components
Options        :
    DUKTAPE        : on
    MANPAGES       : off
    SPIDERMONKEY   : off
Shared Libs required:
    libintl.so.8
    libgobject-2.0.so.0
    libglib-2.0.so.0
    libgio-2.0.so.0
    libexpat.so.1
    libduktape.so.207
Shared Libs provided:
    libpolkit-gobject-1.so.0
    libpolkit-agent-1.so.0
Annotations    :
    FreeBSD_version: 1400097
    build_timestamp: 2023-11-12T03:42:21+0000
    built_by       : poudriere-git-3.3.0-1251-ge8a0e12e
    cpe            : cpe:2.3:a:polkit_project:polkit:123:::::freebsd14:x64:1
    port_checkout_unclean: no
    port_git_hash  : 2b5c95373
    ports_top_checkout_unclean: no
    ports_top_git_hash: 038ac54bb
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 894KiB
Description    :
Polkit is a toolkit for defining and handling authorizations. It is used
for allowing unprivileged processes to speak to privileged processes.
 
Obviously the problem source is: You did not reinstall all packages/ports after the upgrade. At least I miss this step in your step list.
When using packages pkg update && pkg upgrade -f should do the job, ports you need to recompile.
as long as you have not confirmed the reinstallation of _all_ packages and ports, I see no further hints to give...
 
# ./check-14-packages Port devel/libpthread-stubs : FreeBSD:13:*
OK. This means devel/libpthread-stubs is still built for 13.x, but this port is already deleted this March. So you can deinstall it, if you are sure this is already a leaf port.

If you are building ports locally on bare-metal environment using portupgrade, portmaster, pkg_replace or something else, or even make deinstall reinstall clean, possibly wrong dependencies are automatically picked and mis-behaving. This wouldn't happen if you build ports on clean-room environment like poudriere or jenkins.

Another possibility is that if you reinstalled packages using official pkgs, depending on the timing, builds of some pkgs was still on-going and not ready, thus its explicit dependencies are forcibly deinstalled from your computer. /usr/local/sbin/pkg wants to deinstall pkgs which its dependencies are updated but the pkg itself is still old.
 
as long as you have not confirmed the reinstallation of _all_ packages and ports, I see no further hints to give...

I've reinstalled all the packages as suggested,with "pkg update && pkg upgrade -f" , but the error is still there.
 
Back
Top