Page 216 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 216

Network Operating Systems-I




                    notes          Because it is so dangerous to be logged in as root, you should never use this account unless you
                                   have to. The root account is meant to be used by the System Administrator to perform certain
                                   duties which can be destructive and therefore should only be performed by an expert. Some
                                   examples  are  emptying  log  files,  mounting  and  unmounting  file  systems  (more  on  this  later
                                   under Getting to CD’s and Floppies), installing or removing programs, and creating or deleting
                                   user accounts.

                                   If you are using Mandrake Linux, you will have a tool available to perform the most common
                                   administration tasks, even when logged in as a regular user. This is called the Mandrake Control
                                   Center, which you may find on your desktop or in the Configuration menu. It will ask you for
                                   the root password when you start it for security reasons. As a result of this handy tool, you may
                                   never need to actually log in as root.

                                   Becoming superuser

                                   No phone booth needed. The obvious way is to login as root. That’s the best way to do it if you
                                   plan on doing a bunch of system maintenance type stuff, but it can be a pain if you’re logged in
                                   as User with an X session and 14 programs open and connected to the Internet and you just need
                                   to copy one file into /usr/lib so you can run this program you just downloaded. Fear not, there
                                   is a better way. Type this:

                                   [user]$ su
                                   Password:*****
                                   [root]#
                                   Bang! Just like that, you are SuperUser! A few cautions: Although you are now SuperUser, this
                                   is not a “login” shell, so your environment hasn’t changed. The biggest way this will effect you
                                   is that some programs you normally run as root may appear to be missing. That’s because your
                                   PATH environment variable, the list of places Linux looks for executables, does not contain /sbin
                                   or /usr/sbin. If you try to run a command like shutdown (see below) and it complains, try typing
                                   /sbin/shutdown instead. That should do it.
                                   When you are finished with your maintenance tasks you should immediately change back to
                                   normal user mode:
                                   [root]# exit
                                   [user]$




                                      Note     While you are SuperUser, your command prompt looks different. An ordinary
                                     user is prompted with the dollar sign ($) while SuperUser gets a pound sign (#).
                                   This makes it easy to tell which mode you are in. (This is true on most distributions, but the
                                   prompts may be different on different distributions, and they can be customized.)
                                   11.2 normal users in Linux


                                   A “root” user has the power to do anything on a Linux system. A “normal user” will be assigned
                                   some of these capabilities based on what group they are in, but is generally prevented from
                                   running any commands that may affect the system outside of their home directory. Users can be
                                   granted “sudo” rights, which allows them to run the sudo command and temporarily be granted
                                   root privileges.






          210                              LoveLy professionaL university
   211   212   213   214   215   216   217   218   219   220   221