I need to accesss a folder with a Lock but forgot my Root password

Hello
i’m trying to access /var/lib/bluetooth following this in the Arch wiki:
https://wiki.archlinux.org/title/Bluetooth#Saving_the_configuration
running cd /var/lib/bluetooth says the follwing:

sudo: "cd" is a shell built-in command, it cannot be run directly.
sudo: the -s option may be used to run a privileged shell.
sudo: the -D option may be used to run a command in a specific directory.

sorry for the noob question.

You can’t use cd with sudo.

If you need cd , switch to root and change in the folder you want to access. If you don’t know your root password, use sudo for example with

sudo su -

You should also set a new root password.

2 Likes

thanks that worked but i have no idea how to proceed
i’ll make another thread on it.

cd /var/lib/bluetooth
should work from within your user account

You may not be able to even read any files in that directory (I did not check)
Then you can use sudo to access them, to work on them.

Question is:
what is it that you want to do to these files?
(or think you need to do …)?

You can open and alter ANY file as root.

here i made a new thread:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.