What's new

Solved Trying to install 'locate' but failing to add group mlocate

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

M

MvW

Guest
I'm trying to install locate, following these instructions which seem to have worked by executing

Code:
opkg update
opkg install mlocate

Before I can use it, I have to make sure the database is filled, but when running
Code:
updatedb
it is complaining:
Code:
updatedb: can not find group mlocate[/CODE}

To add a group 'mlocate' with the appropriate permissions, I need the package 'addgroup' or 'synogroup' (as suggested alternative) alternative, but both are apparently not available in entware-ng.

Anyone have any pointers how to create the appropriate group? The instructions are not for Merlin but for Padavan, but looking at them, I can hardly image this coudn't be achieved on Merlin as well. Or am I too positive?
 
Do you specifically need mlocate? How about using GNU locate instead (findutils-locate)?
 
  • Like
Reactions: MvW
You need to add the user mlocate to the group file under /etc in order to use the updatedb command.

You can achieve this by creating a group.add file under jffs > configs, with the content mlocate:x:666: . This way, whenever you reboot your router, user mlocate will be added to the group file and you won't need to add again manually.

Image for reference:

mlocate.png
 
You need to add the user mlocate to the group file under /etc in order to use the updatedb command.

You can achieve this by creating a group.add file under jffs > configs, with the content mlocate:x:666: . This way, whenever you reboot your router, user mlocate will be added to the group file and you won't need to add again manually.

Image for reference:

View attachment 33345

Great solution. I couldn't achieve what I wanted with findutils-locate but with your solution locate from the package mlocate it works like a charm. Thanks for the suggestion!
 
You need to add the user mlocate to the group file under /etc in order to use the updatedb command.

You can achieve this by creating a group.add file under jffs > configs, with the content mlocate:x:666: . This way, whenever you reboot your router, user mlocate will be added to the group file and you won't need to add again manually.

Image for reference:

View attachment 33345
But now I get erros logged due to the 'changed group file':
crond[4365]: / etc / group: bad record (needed to put spaces in the path due error from forum software)

Removing the group.add and just changing the permissions on the database folder: chmod +rw /opt/var/mlocate - did not help...
Any other solution?
 
Last edited:
But now I get erros logged due to the 'changed group file':
crond[4365]: / etc / group: bad record (needed to put spaces in the path due error from forum software)

Removing the group.add and just changing the permissions on the database folder: chmod +rw /opt/var/mlocate - did not help...
Any other solution?
Are you invoking mlocate via cron? If so, does mlocate work from the command line?
 
But now I get erros logged due to the 'changed group file':
crond[4365]: / etc / group: bad record (needed to put spaces in the path due error from forum software)

Removing the group.add and just changing the permissions on the database folder: chmod +rw /opt/var/mlocate - did not help...
Any other solution?
Try replacing the "x" with an "*".

Code:
mlocate:*:99:
 
Are you invoking mlocate via cron? If so, does mlocate work from the command line?
Try replacing the "x" with an "*".

Code:
mlocate:*:99:
@ColinTaylor : I get the error message every 2 minutes - yes, this looks like a cron job, but not initiated by me - maybe a kind of watchdog for the group file...

@underdose : Well as it's looking that the "watchdog" is complaining about group file modification, this might not be a solution... but I will check this later.

Update:
Yes, the star (*) made the difference: Using same format als the other entries in the group list works fine!
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top