We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

change user privilages in linux

Hi all,

How can I change a user to have root privilages in linux?

many thanks
Hi, we’ve had to remove your signature. If you’re not sure why please read the forum rules or email the forum team if you’re still unsure - MSE ForumTeam

Comments

  • cowbutt
    cowbutt Posts: 398 Forumite
    Part of the Furniture Combo Breaker
    Yes, but it's usually the wrong approach to the problem (it's akin to running as Administrator in Windows). What are you trying to achieve?
  • trcooke
    trcooke Posts: 309 Forumite
    Like cowbutt says, you can but it's not recommended. What distribution of Linux are you using? For Ubuntu (and other Debian based distro's) you can give your user one-off root privs for a command by typing "sudo" before the command. For example:
    sudo apt-get install frozen-bubble
    
  • millwalll
    millwalll Posts: 912 Forumite
    Part of the Furniture Combo Breaker
    well i alway got told that you should never use root but make a new account with the same sort of privilages as root is this wrong ?
    Hi, we’ve had to remove your signature. If you’re not sure why please read the forum rules or email the forum team if you’re still unsure - MSE ForumTeam
  • toontastic
    toontastic Posts: 348 Forumite
    Part of the Furniture
    millwalll wrote: »
    well i alway got told that you should never use root but make a new account with the same sort of privilages as root is this wrong ?

    When you installed Linux you would have put some details in and an account would have been created (and most modern installs anyway) you will be logging in with this account and not root. So this is why when you do anything you will be asked for your password or to enter sudo to get you the root permissions to do something. I hope this makes sense ?
  • S0litaire
    S0litaire Posts: 3,535 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Most Linux OS have "Root" disabled by default. That means you can not log in as "Root".

    This is a security issue since the root user has full system access and you can easily bork your system if you are not careful.

    If you need to run something as Root you can use the "sudo" command i.e.
    user&#64;laptop:-$sudo <insert command here>
    
    stick on your password and the command is run with Root privilages.

    If you need to run more than 1 command use "&&" between commands i.e.
    user&#64;laptop:-$sudo <command 1> && sudo <command 2>
    
    Laters

    Sol

    "Have you found the secrets of the universe? Asked Zebade "I'm sure I left them here somewhere"
  • cowbutt
    cowbutt Posts: 398 Forumite
    Part of the Furniture Combo Breaker
    millwalll wrote: »
    well i alway got told that you should never use root but make a new account with the same sort of privilages as root is this wrong ?

    That's duff advice you've been given, I'm afraid; a new account with the same privileges as the root account *is* a root account (in all but name), since it's the UID and GID of 0 that gives root its powers.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352K Banking & Borrowing
  • 253.5K Reduce Debt & Boost Income
  • 454.2K Spending & Discounts
  • 245K Work, Benefits & Business
  • 600.6K Mortgages, Homes & Bills
  • 177.4K Life & Family
  • 258.8K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.