Linux Lite Forums

Software - Support => Other => Topic started by: JanetBiggar on November 13, 2019, 03:29:54 AM

Title: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 13, 2019, 03:29:54 AM
I'm loving the file search DeepThought told me about and using it a lot.

Today on one of the laptops I'm readying for a youth had message at the top saying "the data base hasn't been updated for more than 7 days, update now?" So I clicked on it.

A message indicated it needed to be refreshed and this required administrator privileges and authentication as super user so I entered the pw I set for Administrator (it is the only pw I have ever entered for the system). It doesn't accept my pw, is there a specific superuser pw that I have not set myself of which I am not aware?

What do I need to do?

Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Jerry on November 13, 2019, 03:44:40 AM
It'll be the wrong password entered. Your user password will work.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 13, 2019, 08:11:24 AM
I'm loving the file search DeepThought told me about and using it a lot.
Catfish is great.

Quote
... had message at the top saying "the data base hasn't been updated for more than 7 days, update now?"
I've been using it for years on systems with quite a bit of data, know I've gone way more than 7 days between uses, and never gotten such a message. On any hardware from this century you should never notice a performance issue even if it never updates the database. If there's an option to skip that step, you can try that, too, but the real Jerry is probably right, you probably just mistyped your pw.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: m654321 on November 14, 2019, 04:15:12 AM
"the data base hasn't been updated for more than 7 days, update now?" So I clicked on it.


Hi Janet,

As far as I know, this message is normal. I get it from time to time, when I haven't searched a large video database (on external drive) for a while. What you did was fine, but as Jerry said your password must be incorrect. Maybe time to reset your password if you've forgotten it, or can't find where you wrote it down ...
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 14, 2019, 06:06:32 AM
Thanks for your thoughts everyone. 

Jerryc - I can certainly choose to NOT update and it works just fine.
Jerry & m654321 - I am definitely using the correct password as it is the same password I use to get into the laptop and to be doubly sure I did try it again making certain I was typing it in correctly.  Still got the same thing.  I took some screen shots and will try to post them here.  After the last screen shot I then got a message saying something to the effect that it was not responding and did I want to close it or wait.  I closed it.

It's not a bit deal since the file search still works, however just in case someone is interested in determining the problem.

Here goes let me try uploading the pics:

https://imgur.com/Z3tOSr4

Hope this works...
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 14, 2019, 06:11:52 AM
Not sure you can see all the pics so will try again:

https://imgur.com/a/VGkY7u6
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 14, 2019, 06:13:24 AM
Good, the pics are there however the second pic should be the first then the order is correct.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: DeepThought on November 14, 2019, 06:28:33 AM
Hi @JanetBiggar  Is "Numlock" enabled ?  Quite often when log in "Numlock" is disabled and inputting the password works, but afterwards as you reach the desktop Linux Lite enables "Numlock" by default. This would then make the password incorrect if you use any key that has been locked by "Numlock".

Usually there is any indicator light to show "Numlock" is on, but a quick way to test is to try "sudo apt update" and try inputting your password when requested. If this fails because of invalid password then I'd guess numlock is on and you can disable it using an F key or more permanently using Lite-Tweaks :)
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Jerry on November 14, 2019, 07:31:39 AM
Are you logged in as the user with sudo privileges, or as the student who I assume would have none.

Sent from my Mobile phone using Tapatalk

Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 14, 2019, 08:35:46 AM
I only ever set up one user and this same pw works to get into any other area (say synaptics, etc). Is there something "special" I need to do to log in as sudo?
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 14, 2019, 01:43:39 PM
When it asks for the update and you can't get your pw to work, you could close it, then, from the command line:
Code: [Select]
sudo catfish
The terminal will ask for your pw, but you shouldn't get the pw message from catfish. Hopefully, once you update the db, it won't ask again for a long time, and you can run catfish from your menu and/or panel.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Jerry on November 14, 2019, 05:02:28 PM
Open Lite User Manager and see how many users are listed in the drop down box. Then see which ones have the sudo box ticked or unticked.

Sent from my Mobile phone using Tapatalk

Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 14, 2019, 05:06:28 PM
Open Lite User Manager and see how many users are listed in the drop down box. Then see which ones have the sudo box ticked or unticked.
Wow! What a great feature. Simple elegance.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Moltke on November 14, 2019, 11:14:01 PM
When it asks for the update and you can't get your pw to work, you could close it, then, from the command line:
Code: [Select]
sudo catfish
The terminal will ask for your pw, but you shouldn't get the pw message from catfish. Hopefully, once you update the db, it won't ask again for a long time, and you can run catfish from your menu and/or panel.

It's better to use gksu than sudo for GUIs apps, as explained here: https://help.ubuntu.com/community/RootSudo
Quote
You should never use normal sudo to start graphical applications as root. 
You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets 
HOME=~root, and copies .Xauthority to a tmp directory. This prevents files 
in your home directory becoming owned by root. 
(AFAICT, this is all that's special about the environment of the started   
 process with gksudo vs. sudo).

So, instead of
Code: [Select]
sudo catfish you should be using
Code: [Select]
gksu catfish

Hope this helps! :)
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 15, 2019, 12:05:03 AM
It's better to use gksu than sudo for GUIs apps
The scope of that problem may be far less than originally believed. From: https://beamtic.com/sudo-and-guis (https://beamtic.com/sudo-and-guis)

Quote
Running graphical programs using sudo in Ubuntu is basically fine – in many cases. However, in some freak cases it might cause problems! However, I have not encountered these myself yet.

That's been my experience. However, I only do it when I'm working on files or directories where I need root permissions, e.g., "sudo gedit" or "sudo thunar" to work with something in /etc. I don't use it, and certainly would not recommend it, for work on files or directories where root permissions are not needed.

My best guess is it would not be a problem using it with catfish, but your note of caution is worth exploring further.

Here's another thought: Let's use synaptic as an example. Most of us open synaptic from the menu, then get a popup asking for our root pw. If, instead, we used a terminal and called it with "sudo synaptic," other than not getting the popup asking for the root pw, would it operate any differently? I doubt it. I'm guessing the same would be true with catfish asking for the root pw.

All that said, I'm simply speculating based on my experience and assumptions, but I've never looked at these things under their hoods.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 15, 2019, 12:45:09 AM
Open Lite User Manager and see how many users are listed in the drop down box. Then see which ones have the sudo box ticked or unticked.

Sent from my Mobile phone using Tapatalk

So I did this and the only user(s) are; Administrator which has the sudo box checked and root.

Because I don't wish to get in over my head (sounds like perhaps I might get into trouble if I do sudo catfish or gksu catfish...) AND the file search works fine when I simply "x" the 'Do you want to update the database' I think I will not do anything unless I find out that I won't/can't get myself into hot water!
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Jerry on November 15, 2019, 04:26:36 AM
Does Install Updates work when you enter your password?
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Moltke on November 15, 2019, 07:29:15 AM
Quote
Here's another thought: Let's use synaptic as an example. Most of us open synaptic from the menu, then get a popup asking for our root pw. If, instead, we used a terminal and called it with "sudo synaptic," other than not getting the popup asking for the root pw, would it operate any differently? I doubt it. I'm guessing the same would be true with catfish asking for the root pw.
That'd be gksu working. Gksu is  a graphical frontend for sudo that allows graphical command to be run without the need to run an X terminal emulator and using su directly. It's effectively just a GTK+ skin for the superuser commands. Try this so you see for yourself; press alt+f2 which will launch app finder tool, type sudo thunar and click on run, then type gksu thunar and click on run, what did happen in both cases?
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: supergamer on November 15, 2019, 09:39:49 AM
I had ran into issues similar once before while building and it turned out to be a permission issue of not having read access to the files. I am betting the user account does not have proper permissions to search certain areas and that is why the splash screen keeps coming up.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 16, 2019, 08:33:54 AM
Does Install Updates work when you enter your password?

Yes, it has in the past with no issue. 

I say "in the past" because I switched over to using "Update Manager" such that I could avoid updating items that might cause a glitch on these laptops. I ran into an issue twice (once each on two laptops) whereby the laptops started to act oddly which was after doing "install updates".  I simply reverted an earlier system back point and all was fine.  After that I have been sticking to updating only the 1-3 level updates and avoiding the 4 & 5's.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 16, 2019, 08:46:12 AM
That'd be gksu working. Gksu is  a graphical frontend for sudo that allows graphical command to be run without the need to run an X terminal emulator and using su directly. It's effectively just a GTK+ skin for the superuser commands. Try this so you see for yourself; press alt+f2 which will launch app finder tool, type sudo thunar and click on run, then type gksu thunar and click on run, what did happen in both cases?

So I did the above.  When I did alt & F2 then put in sudo thunar then clicked the gear icon, nothing happened.  The wlndow disappeared and nothing occurred.  When I did alt & F2 and put in gksu thunar, clicked on the gear then another window popped up asking for my pw which I put in and then it took me into the area (warning me that I was in or running as root).

So what does this mean with respect to "IF" I do wish to update the catfish data base, what must I do/type?
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 16, 2019, 09:06:30 AM
So what does this mean with respect to "IF" I do wish to update the catfish data base, what must I do/type?

I'd be fine with:

Code: [Select]
gksu catfish
I like the alt + f2 combo, too. Never used it before, always just launched a terminal. Thanks, Moltke.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: trinidad on November 16, 2019, 10:13:58 AM
Gksu is deprecated for a reason. Running an application's graphical user interfaces in root can introduce its bugs into the root file system, and security issues along the same X channels. In fact an application's graphical user interface display should never be run in root because of this issue. Forget about catfish and try these CLI tools. You don't need the catfish interface for the simple searching you are doing. These may or may not be already installed in your default LL system. Try the commands first before you attempt to install the tools.

https://www.howtoforge.com/tutorial/linux-search-files-from-the-terminal/

TC
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Moltke on November 16, 2019, 12:58:08 PM
@JanetBiggar Are you having this issue in LL 4.6? I checked those screenshots you shared and noticed that in one of them reads that the database was last updated 03/29/2017 which is more than two years ago, so that might be the reason you're getting that weird message. 

(https://i.imgur.com/TvSM6v0.png)

Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: JanetBiggar on November 16, 2019, 11:56:05 PM
To answer your question Moltke I have only put LL3.8 on these laptops. While I am starting to get some “newer” (I use that term loosely!) laptops many of them are sufficiently old and thus lack the RAM and HD size that would work best with the 4 series. I also love systemback and use that enough when/if I run into issues.

I think I will choose to let sleeping dogs lie since the search function works despite not updating.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 17, 2019, 05:15:10 AM
I checked those screenshots you shared and noticed that in one of them reads that the database ...

Here's another workaround I'd be comfortable with. Change the permissions on the db with:

Code: [Select]
sudo chmod 666 /var/lib/nlocate/mlocate.db
Then run catfish, and it should update without needing the admin pw.

I wouldn't even worry about changing it back, since it's only data, but if you were concerned, after the update you could run:

Code: [Select]
sudo chmod 644 /var/lib/nlocate/mlocate.db
As far as running gui programs as root, like doing anything as root, caution is always advisable. That said, I've been doing it selectively for years with stable programs like thunar and gedit, without issue, foresee none, and currently have no intention of stopping.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: trinidad on November 17, 2019, 10:02:16 AM
Quote
I've been doing it selectively for years with stable programs like thunar and gedit, without issue, foresee none
Those days are coming to an end, and there are several important reasons why, and it is not good advice to encourage new users toward a praxis that involves purposely deprecated software like gksu. It's about like recommending Windows XP over Windows 10. The often referenced mission statement for Linux Lite is to create a Linux software environment that new users coming from Windows can easily transition to. It's certainly counter intuitive here to encourage the inexperienced Linux user to use bad or deprecated tools. Go argue about it on the Deb channels: http://forums.debian.net/viewtopic.php?f=20&t=144101 but please not here, where the new inexperienced user is the most important.

TC
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: jerryc on November 17, 2019, 11:50:10 AM
it is not good advice to encourage new users toward a praxis that involves purposely deprecated software like gksu.

I don't used gksu. I use sudo.
Title: Re: Catfish file search - updating data base asking for authentication as superuser
Post by: Moltke on November 17, 2019, 08:48:32 PM
Quote
I've been doing it selectively for years with stable programs like thunar and gedit, without issue, foresee none
Those days are coming to an end, and there are several important reasons why, and it is not good advice to encourage new users toward a praxis that involves purposely deprecated software like gksu. It's about like recommending Windows XP over Windows 10. The often referenced mission statement for Linux Lite is to create a Linux software environment that new users coming from Windows can easily transition to. It's certainly counter intuitive here to encourage the inexperienced Linux user to use bad or deprecated tools. Go argue about it on the Deb channels: http://forums.debian.net/viewtopic.php?f=20&t=144101 but please not here, where the new inexperienced user is the most important.

TC

I wasn't aware gksu is now deprecated. A web search showed some results and we're suppose to use pkexec or something like gedit admin:///etc/default/apport according to this article https://itsfoss.com/gksu-replacement-ubuntu/ I tried the latter and I got a blank file. I did via the app finder/launcher tool with alt+f2, same result via terminal. The pkexec approach didn't work either with the app finder/launcher tool, when tried in the terminal got this error
Code: [Select]
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
And yes, I'm 100% sure I typed in the right password. So I guess will continue to use gksu or sudo, I do have the option in the right-click menu to open thunar as root as well as the terminal though. Why do they change the questions when we already know the answers?  8)