I used debootstrap to install debian in a folder
I used chroot to open a shell in the folder.
the root user works perfectly.
I need help to create a new user. I created one but I cannot use sudo in it.
It cannot resolve my host untill I hard-code the host and its IP in /etc/hosts
Then I get an error when I use sudo. THe su command has many parameters but -u does not exist. Maybe it is the key command here.
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
a
-----------------------
Here is the exact list of commands I have run from scratch:
Code: Select all
sudo apt-get install debootstrap
sudo mkdir /stable-chroot
sudo chown myname:myname /stable-chroot
sudo debootstrap stable /stable-chroot http://deb.debian.org/debian/
sudo cd /stable-chroot/
sudo mount -t proc proc proc/
sudo mount --rbind /sys sys/
sudo mount --rbind /dev dev/
sudo chroot /stable-chroot/ /bin/bash
--> add a user
adduser appium
addgroup appium sudo
apt-get install sudo -y
su appium