wie kann ich den pi so einstellen das er mich nach dem root passwort fragt wenn ich sudo -i eingebe. der pi user ist ja schon gesichert mit passwort nur root bekomme ich nicht gesetzt und abgefragt.
Are you using Raspbian? What user are you when you try sudo -i
?
Deine Beobachtung ist die Standardkonfiguration von Raspbian, und damit kein Grund zur Sorge
Ich vermute mal, es wird deswegen nicht nach einem Kennwort gefragt, weil der Benutzer pi Mitglied in der Gruppe sudo ist.
groups pi
Zudem könnte die Anwort auf die Frage
sudo -i
eliminates the need for a password. Isn't that a problem for security reasons?
hilfreich sein:
habs grade getestet leider wird mir nur mehrere vorschläge angezeigt wie ich den befehl nutzen könnte. aber trotzdem danke für die hilfe und den hinweiß link.
im using stretch buster wasnt working for me.
pi user is in an admin group thats what i know, it was a long time ago that I used linux, there it was so that I could use a lot only with sudo -i, without it usually did not work.
If it's Raspbian then pi
is allowed passwordless sudo
by default. See https://www.raspberrypi.org/forums/viewtopic.php?t=169212#p1087020 (English) for a way to adjust that.
Edit: TLDR
sudo nano /etc/sudoers.d/010_pi-nopasswd
There's only one line:
pi ALL=(ALL) NOPASSWD: ALL
Change it to
pi ALL=(ALL) PASSWD: ALL
thx that fixed it.