fsfw-dresden / usb-live-linux

USB-Stick-Live-Softwareumgebung für Lernende und Lehrende jeden Alters: Schulstick, Unistick, Makerstick, Rentnerstick..
38 stars 15 forks source link

Root Access to Live system #186

Closed emjaaa closed 7 months ago

emjaaa commented 7 months ago

I got on the "Schulstick"s at the Chemnitzer Linux Tage 24 and played with it for a while. Your project is really cool and the system super easy to use.

Problem description:

When I wanted to use the root-shell I noticed that the user of the live system user (who has a blank password) can not use sudo (not in the sudoers file). And when opening the Terminal and pressing s to use the root shell an (at least for me) unknown password is requiered.

Questions:

Could you tell me where to find this root password? Is the live system designed to be updated?

eMPee584 commented 7 months ago

happy to hear you liked our system! Yes, in contrast to the uni- & market stick variants, sudo / root access is disabled for the schulstick by default to prevent a kid from reformatting their parents' disk and putting Debian on it.. however, it is just a first line of defense with classic "security by obscurity" approach: You can find the root password by looking at /proc/cmdline and reenable sudo by editing the /boot/grub/grub.cfg on the first partition and removing the noroot parameter.. which i obviously should have done for the edition handed out at CLT, sorry for missing that 😅 any suggestions for a better approach would be very welcome though! 👍

eMPee584 commented 7 months ago

oh and regarding the updates: the unattended-updates mechanism is enabled and is configured to (if not running on battery, with a metered network or without persistence) get new package lists a few minutes after boot and automatically apply all security updates. That's why you might get an error about the package system being locked trying to run apt or aptitude while that happens.. you could kill the unattended-update process in that case if you really wanted and apt should cleanly finish the current package update than exit and free the dpkg lock. You can apply other updates or install additional packages in a normal way using synaptic (GUI), aptitude (TUI) or apt (CLI) as you normally would on any other Debian-based system once you have root access.. 😎

emjaaa commented 7 months ago

It worked! Thank you!

I think it was a good idea to deactivate root for students. Messing up your system with root can happen quickly.

eMPee584 commented 7 months ago

Freut mich ; ) Das Gute an dem live-Ansatz ist ja: man kann im Boot-Menü die Persistenz zurück setzen.. weil wir die gesplittet haben ggf auch nur die system-Persistenz, ohne Verlust der Nutzerdaten oder WLAN-Passwörter.. aber du weißt ja was du machst anscheinend 😉 check gern mal unsern terminal desktop aus (custom ranger & tmux conf: prefix ist CTRL-A, dann auf 'h' siehst du die standard shortcuts, auf 'F1' die custom shortcuts..)