OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: lshantz on August 21, 2020, 08:58:57 PM

Title: updatedb locate proper usage
Post by: lshantz on August 21, 2020, 08:58:57 PM
I LOVE the locate utility, but I'm not sure how to do a database update in Opnsense. If I run updatedb as root, it kicks me out saying it is unsafe. If I try to use just a system username it says permissions denied. What is the proper way to rung updatedb to update the database?
Title: Re: updatedb locate proper usage
Post by: dinguz on August 22, 2020, 12:36:45 PM
You can run this as root:

/usr/libexec/locate.updatedb

It will print a warning, but run anyway.

>>> WARNING
>>> Executing updatedb as root.  This WILL reveal all filenames
>>> on your machine to all login users, which is a security risk.
Title: Re: updatedb locate proper usage
Post by: Fasio on August 22, 2020, 04:18:07 PM
Updates depend on the current user rights, try creating them with full administrator rights and making changes through them.
Title: Re: updatedb locate proper usage
Post by: lshantz on August 22, 2020, 04:52:53 PM
DOH! It went so fast, I thought it didn't run. I'm used to a typical linux system to run for a few minutes. I also found that find / -name <filename> would print results in nanoseconds and a older mechanical hard drive could take many minutes. I guess the fact that the OS is small and the ssd is extremely fast changes things in a big way.