toolboc / psx-pi-smbshare

A swiss army knife for enhancing classic game consoles with Raspberry Pi
387 stars 34 forks source link

[Minor issue] Root owns files I wish to edit for adding a power off button to PI 4B / Found a swap file by the name "/boot/.config.txt.swp" #33

Closed Nikhchan closed 3 years ago

Nikhchan commented 3 years ago

EDIT: Added the code by setting a password. so stupid of me.

ORIGINAL MESSAGE: So I have the PSX Pi smbshare running successfully on Pi 4b using the methods discussed here.

But I am trying to add a power off button via GPIO3 pin. For that, I need to add following command in the boot/config.txt file.

#shutdown button dtoverlay=gpio-shutdown

But the file seems to be only writable by 'root' and everyone else can only read and execute.

Now I am not aware of this root user password. I tried the usual defaults like root, toor, raspberry, strawberry, etc. None worked..

Anyway to edit that file or if you can share that root's pw, that would be great. I have backed up the default config.txt file.

But would like to know I get a warning now upon opening the config.txt file.

E325: ATTENTION Found a swap file by the name "/boot/.config.txt.swp" owned by: root dated: Fri Jun 18 18:14:54 2021 file name: /boot/config.txt modified: YES user name: root host name: raspberrypi process ID: 1359 While opening file "/boot/config.txt" dated: Fri Jun 18 19:58:48 2021 NEWER than swap file!

So is it safe to delete this file? or is it part of PSX PI SMBSHARE?

Thank you for making this great tool!

toolboc commented 3 years ago

psx-pi-smbshare is built on top of stock Raspbian, as such there is no “root” user. There is a default user “pi” with a password of “raspberry” that has super user permissions. You can therefore edit the file in question by ssh’ing into the device as the ”pi” user and running ‘sudo vi /boot/config.txt’.

Nikhchan commented 3 years ago

psx-pi-smbshare is built on top of stock Raspbian, as such there is no “root” user. There is a default user “pi” with a password of “raspberry” that has super user permissions. You can therefore edit the file in question by ssh’ing into the device as the ”pi” user and running ‘sudo vi /boot/config.txt’.

Thanks for the reply. I know. but the bootconfig.txt file had 'root' as the owner. and it wouldn't allow me to modify it through the Pi user. Neither through ssh nor through directly via text editor. I thought it was something to protect the functionality of the various features of psx pi smbshare.

Thankfully I have rectified the issue. And its clearly not related to the psx-pi-share.