Linux.com

Home Learn Linux Linux Answers Applications How to make normal user to become root user on centos?
Answers
  • When you installed CentOS you created a password for root. Root is a user. Root is the user that owns the OS and everything in it.

    A regular user doesn't become root.

    You can by using the root password work as root.

    This is normally done in terminal so that you can perform administrative tasks by using the command;

    
    su
    {/code]
    You will be requested to give the password for root.

    su stands for Switchy User. If there are other regular users, say user2 you could; [code] su user2


    at which point you would by prompted for the password for user2.

    When you give no user name then root is assumed.

    su by itself will give you the root prompt (#) but will leave you in the same directory, the /home directory for you as user.

    
    su -
    

    will give you the same root prompt (#) but you will be in the home directory for the user root which is /root.
    
    elwin@debian:~$ su
    Password: 
    root@debian:/home/elwin#
    

    the ~ before the user prompt($) indicates your /home/user directory just as writing out does for the root prompt.
    
    elwin@debian:~$ su -
    Password: 
    root@debian:~# 
    

    Where the ~ indicates the home directory for the user root.

    Answered by widget
    5 months ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Applications

Upcoming Linux Foundation Courses

  1. LFD331 Developing Linux Device Drivers
    25 Aug » 29 Aug - Virtual
    Details
  2. LFD411 Embedded Linux Development
    25 Aug » 29 Aug - Santa Clara, CA
    Details
  3. LFS422 High Availability Linux Architecture
    08 Sep » 11 Sep - Raleigh, NC
    Details

View All Upcoming Courses

Community Answers - Search


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board