Switching users
We are now prepared to begin using the packt
account to carry out user administration duties. Use the su
command to switch to that account to accomplish this. Notably, if you’re using CentOS or a comparable operating system, you don’t need to use the root account moving forward:
su -l packt
We are able to check the permissions for our newly formed packt
account by using the sudo
command. Let’s create another account called packtdemo
, shall we?
~ $sudo adduser packtdemo Adding user `packtdemo' ... Adding new group `packtdemo' (1005) ... Adding new user `packtdemo' (1004) with group `packtdemo' ... The home directory `/home/packtdemo' already exists. Not copying from `/etc/skel'. New password: Retype new password: passwd: password updated successfully Changing the user information for packtdemo Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone...