YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
88 stars 28 forks source link

Trouble getting root password #351

Closed JohnnyPicnic closed 1 year ago

JohnnyPicnic commented 1 year ago

I don't have e-mail setup and am having trouble getting the root password. I've tried yunohost app setting peertube admin_pass but get no response.

Last login: Sun Nov  6 14:27:40 2022 from 192.168.1.119
darren@stream:~$ yunohost app setting peertube admin_pass
Error: yunohost command must be run as root or with sudo.
darren@stream:~$ su -
Password: 
root@stream:~# yunohost app setting peertube admin_pass
root@stream:~# 
fflorent commented 1 year ago

It's because it is not stored in the yunohost settings.

Run the following commands:

sudo su # so you log in as root
su - peertube -s /bin/bash # so you log in as peertube
cd /var/www/peertube # adapt if you have multiple instances of peertube
export PATH="/opt/node_n/n/versions/node/16/bin:$PATH"
echo "YOUR_PASSWORD_HERE" | NODE_CONFIG_DIR="/var/www/peertube/config" NODE_ENV=production npm run reset-password -- -u root

You can use a temporary password and then change it on the web UI

JohnnyPicnic commented 1 year ago

Thanks for the quick reply! Where do I find or what is the password for user peertube?

fflorent commented 1 year ago

Actually you cannot, you have to reset it by the procedure I gave you above

JohnnyPicnic commented 1 year ago

Account is not available?

admin@stream:~$ sudo su
root@stream:/home/admin# su - peertube
This account is currently not available.
root@stream:/home/admin# ~
fflorent commented 1 year ago

Oops, I missed the -s /bin/bash:

su - peertube -s /bin/bash # so you log in as peertube

I also updated the procedure above

JohnnyPicnic commented 1 year ago

Cheers that worked. Thank you very much!

fflorent commented 1 year ago

You're welcome! Could you please close the issue then at it is resolved?