Ubuntu 20.4 how to create root user

nkt

Well-known member
  • Aug 11, 2015
    4,286
    4,129
    113
    Why do you need another root user for web development? Just curious :P
     

    isuru_

    Well-known member
  • Apr 26, 2011
    1,621
    1,081
    113
    root user ennawa

    ona command su dala type karanna

    ex: su ls

    if you want to login as root then

    sudo su

    password ekak ahuwoth current user password eka
     

    bestdivx

    Well-known member
  • Dec 17, 2007
    1,814
    1,350
    113
    Cryptosphere
    මට මතක විදියට Ubuntu වල root එකට පස්ස්වොර්ඩ් නැතුව තියෙන්නෙ. අලුතින් password එකක් දුන්නොත් ලොග් වෙන්න පුලුවන්.
    මේ විදියට කරල බලපන්. උබන්ටු සිස්ටම් එකක් නෑ ටෙස්ට් කරල බලන්න. බොහොමයක් Linux වලට මේක හරියනව.

    sudo -i
    (උබේ password එක දැන් ගහපන්)
    ඊලගට
    passwd
    (දැන් උබ කැමති password එකක් root ට දීපන්)
    exit
    ඊලගට
    su root
    (අලුතින් දීපු password එක දැන් කොටපන්)
     
    • Dislike
    Reactions: jcj

    nkt

    Well-known member
  • Aug 11, 2015
    4,286
    4,129
    113
    ignore the permission errors
    the best practice is to create separate users for the servers you use. For example for postgresql you create a prostgresql user. And for the folders you can set permission separately. In the way you are going to do it, the permissions are kinda useless :P
     

    gayan.w

    Active member
  • Dec 10, 2020
    198
    191
    43
    play.google.com
    Most distributions include a root user by default. For example in Ubuntu you could switch to root user by,

    Code:
    su -i

    It's hard to provide any specific answer without knowing the exact distribution or the requirement.
    So for instance, if your web content is hosted at /var/www, you could just chown it to the current user. Then you could work on that directory as you'd normally work in a project that is in the /home
     
    Last edited:

    Rumeshzoysa

    Active member
  • May 31, 2010
    171
    97
    28
    Most distributions include a root user by default. For example in Ubuntu you could switch to root user by,

    Code:
    su -i

    It's hard to provide any specific answer without knowing the exact distribution or the requirement.
    So for instance, if your web content is hosted at /var/www, you could just chown it to the current user. Then you could work on that directory as you'd normally work in a project that is in the /home
    thanks