Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Linux user running Bitcoin Core should not have sudo permissions #10

Open
epiccurious opened this issue Jan 11, 2023 · 4 comments
Open
Labels
BUG Something isn't working HARD Extra attention is needed SECURITY Security and privacy issues

Comments

@epiccurious
Copy link
Owner

We are currently launching bitcoin-qt as an administrator with super user permissions.

Need to create a separate user like "bitcoin" that has restricted permissions.

Also lock down what ports that user can communicate on.

Determine which parts of this guide video are relevant for all general use cases and if we want to use the admin to control services to control the users that control the binaries: https://m.youtube.com/watch?v=_Hrnls92TxQ

@epiccurious epiccurious added EASY Good for newcomers SECURITY Security and privacy issues BUG Something isn't working labels Jan 30, 2023
@epiccurious epiccurious added this to the MVP milestone Jan 30, 2023
@epiccurious
Copy link
Owner Author

Updating this issue to HARD since it involves researching best security practices for Linux services.

@epiccurious epiccurious added HARD Extra attention is needed and removed EASY Good for newcomers labels Jun 13, 2023
@epiccurious epiccurious removed this from the Minimum Viable Product milestone Dec 9, 2023
@epiccurious
Copy link
Owner Author

epiccurious commented Dec 9, 2023

Removing from Adding back to the MVP milestone.

@epiccurious
Copy link
Owner Author

epiccurious commented Dec 20, 2023

sudo adduser --disabled-password --gecos "" bitcoin
sudo usermod -aG bitcoin $USER
sudo cp bitcoin/bin/* /usr/local/bin/
xhost +si:localuser:bitcoin

https://www.tecmint.com/switch-user-account-without-password/

sudo vi /etc/pam.d/su

# This allows root to su without passwords (normal operation)
auth       sufficient pam_rootok.so

# Allow users in group bitcoin to su to bitcon account without password
auth       [success=ignore default=1] pam_succeed_if.so user = bitcoin
auth       sufficient    pam_succeed_if.so use_uid user ingroup bitcoin

Exec=/bin/bash -c 'su bitcoin -c "bitcoin-qt %u"'

mkdir .bitcoin
chown bitcoin .bitcoin/
chmod 750 .bitcoin/

@epiccurious
Copy link
Owner Author

Moving to Phase I milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working HARD Extra attention is needed SECURITY Security and privacy issues
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant