If everything goes well, the virtual console display should look similar to the following example:
Connected to tty1 at 38400 bps. gnu-linux login:
Log in as root.
Create a new, unprivileged user and new group by appending a line
to the /etc/passwd
and
/etc/group
files, respectively. Be sure to use a
double greater-than (>>) to avoid accidentally overwriting the
files.
bash#
echo "floyd::501:500:User:/home/floyd:/bin/sh" >>/etc/passwdbash#
echo "users::500:" >>/etc/groupbash#
mkdir /home/floydbash#
chown floyd.users /home/floydbash#
chmod 700 /home/floyd
Switch to virtual terminal tty2 by pressing ALT+F2.
Log in as floyd.
Try the following commands and verify that they work.
bash$
pwdbash$
ls -l /bash$
cat /etc/passwd
Try the following commands and verify that they do not work.
bash$
ls /rootbash$
/sbin/shutdown -h nowbash$
su -