Page 208 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 208
Network Operating Systems-I
notes
Note Most of you use the root account for day to day tasks but this is wrong.
The easiest way to add a new user is to use the useradd command like this: useradd bart. We
have now created a new user called bart. All basic requirements are met at this point. We would
probably want to assign a password for that user and this is done with the command passwd
bart.
Everything starts with the /etc/passwd file. Here, you can see all the accounts that exist on your
Linux system and for each one, there are several fields that describe various stuff. By default,
your /etc/passwd file has several entries that are actually users for programs that need to control
processes or need “special” access to the filesystem. You’ll also see there the root account and
perhaps some user accounts that were created at installation time or after that.
11.1 superuser
In Linux and Unix like computer operating systems, root is the conventional name of the user
who has all rights or permissions (to all files and programs) in all modes (single- or multi-user).
The etymology of the term may be that root is the only user account with permission to modify
the root directory of a Unix system.
superuser login - How to become superuser in Linux
Under Linux (and other Unixish oses) you use command called su. It is used is used to
become another user during a login session or to login as super user. If Invoked without
a username, su defaults to becoming the super user. It is highly recommend that you
use argument - to su command. It is used to provide an environment similar to what the
user root would expect had the user logged in directly. Type su command as follows:
$ su -Output:
Password: <TYPE ROOT PASSWORD>
#
Once you typed the root user password, you become super or root user.
All users on a Unix system are the same, except one. That user is called the superuser and has
complete control of the system. This user can kill any of the running processes and access all of
the files (including the device files, so root is the one who configures the hardware), as opposed
to ordinary users who can only mess with their own processes and files. Many other operating
systems have a similar notion of one or more super-privileged accounts. On Unix the superuser
is called root (think of a tree here), because this account alone has sufficient permissions to
manipulate the files and directories involved in the creation of new user accounts. (You can
change that of course, but you really don’t want to.) If you are logged in as a regular user and
you want to “become root”, you use the command (which stands for switch user and can change
you to any user).
Before we proceed, it would be best to cover some basic user administration topics that will be
very useful in later unit.
202 LoveLy professionaL university