Neo_78 wrote: Mon Feb 07, 2022 1:55 am
It looks like PET files that have been installed in this way under the root account cannot be executed under a non-root user account.
No, it's not the method of installation/conversion. The installation works correctly, and so is the conversion. But the conversion only changes the package format, it doesn't modify the programs inside the package. If the program decides to do some acrobatics when it's not run by root, there is nothing that the package-converter can do.
The respective menu links do not work.
If you run this from the terminal (the command to launch Pup-SysInfo from CLI is "pupsysinfo"), you will see why.
Code: Select all
sandbox# run-as-spot
sandbox# id
uid=502(spot) gid=502(spot) groups=502(spot),3(tty),17(audio),18(video),111(lp),112(lpadmin),1001(vboxusers)
sandbox# pupsysinfo
Password:
It's stuck there waiting for a password.
Is there a way around this?
Yes, of course. But the "workaround" is application specific.
Firstly, we need to know why does it ask for password when it's being as non-root?
If you open the file /usr/local/Pup-SysInfo/Pup-SysInfo (the actual Pup-Sysinfo program), you will see why.
On line 6, it says this:
Code: Select all
[ "`whoami`" != "root" ] && exec sudo -A ${0} ${@}
It basically means that if you're not root, then try to re-run the program under "sudo".
The entire idea of "sudo" is to enable non-root users to run program as root, without any authentication (if you think that's not very secure, then you're right!). But our "sudo" isn't the real one, it actually calls "su" behind the scene, and "su" always asks for password (at least the one we use, not su-FULL). That's why you see the password prompt when you launched it in terminal. If you launched it from the menu, you don't see the password prompt - but the program is still stuck there, waiting for the password that never comes ...
So how to fix it?
1. You can just comment out the entire line 6 (add a # in the beginning of the line). But this may or may not work. There is a reason why radky wants to escalate to root; I think it's because some parts of the system info can only be obtained when you're running as root.
2. Instead of using "sudo", why not use Fatdog's privilege escalation program, which is "gtksu".
Delete line 6, and in its place put this:
Code: Select all
if [ "`whoami`" != "root" ]; then
if type gtksu 2> /dev/null; then # Fatdog
exec gtksu "Launching Pup-Sys-Info" ${0} ${@}
elif type sudo 2> /dev/null; then # Other puppies with support for sudo
exec sudo -A ${0} ${@}
else
Xdialog --msgbox "Running Pup-SysInfo as non-root. Some information might be missing." 0 0
fi
fi
But from your other threads, you don't like gtksu, so this is probably not something you want as well ...