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

Unbreak sudo su #176

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ mount -t devfs devfs ${FSMNT}/dev

# Disable direct root login; users in the wheel group can use sudo instead
echo "Disabling direct root login; users in the wheel group can use sudo instead"
# Since /etc/passwd is generated from /etc/master.passwd, do not edit it directly but use pw instead
# chroot "${FSMNT}" pw usermod root -s /usr/sbin/nologin # FIXME: With this, sudo su does not work
chroot "${FSMNT}" pw lock root # FIXME: With this, sudo su does not work
# "Star out" the root password; unlike locking the password this allows sudo su
chroot "${FSMNT}" env EDITOR=ed vipw <<EOF
/^root/s/root:[^:]*:/root:*:/
wq
EOF

# Add regular user
# Ask for username and/or password in case the graphical installer frontend did not supply them
Expand Down