Files
jupyterhub/README.md
2026-02-15 05:33:56 +00:00

37 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# jupyterhub
настройки для stellars-jupyterhub-ds
https://gitea.manturovo-it.ru/nchebrov/stellars-jupyterhub-ds
https://github.com/stellarshenson/stellars-jupyterhub-ds
Смена администратора
* Создать нового пользователя, к примеру `super`
* Назначить его админом с помощью следующих команд
```
docker exec -it stellars-jupyterhub-ds-jupyterhub python3 -c "
import sqlite3
conn = sqlite3.connect('/data/jupyterhub.sqlite')
cursor = conn.cursor()
cursor.execute('SELECT name, admin FROM users')
for row in cursor.fetchall():
print(f'User: {row[0]}, Admin: {row[1]}')
conn.close()
"
```
```
docker exec -it stellars-jupyterhub-ds-jupyterhub python3 -c "
import sqlite3
conn = sqlite3.connect('/data/jupyterhub.sqlite')
conn.execute(\"UPDATE users SET admin=1 WHERE name='super'\")
conn.commit()
print('Готово')
for row in conn.execute('SELECT name, admin FROM users'):
print(f'User: {row[0]}, Admin: {row[1]}')
conn.close()
"
```