1. #1
    Herald of the Titans Serpha's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    London
    Posts
    2,521

    root and standard user in Linux

    Hello, I installed (again) Linux Mint 17.2 and I am just confused with couple of things.
    So, I just installed Mint 17.2 and created account and now I'm confused what exactly am I. For this purpose lets say my name is joe.
    So in terminal I am joe@dell with password. Now, when is do SU command (for super user) i put in my normal user password and it makes me super user, only that my name changes colour to red, it stays joe@dell. So my question is, since Linux didn't prompt me to create account or password for root, did i mess up something or what?

  2. #2
    That's how it's supposed to work. Modern distros of linux don't give you access to the root account unless you jump through some hoops. su/sudo/etc temporarily gives you all the power of the root account.
    Signature not found

  3. #3
    Deleted
    One way to check if you're the root user when you do su is to create a file and see who it belongs to. If it belongs to root, then su is doing what you want it to, if it belongs to joe then su is only giving you temporary permissions to do administrative tasks (a list of what it allows you to do can be found on /etc/sudoers). So, do:

    su
    touch test
    ls -lt

    Check file owner for test.

  4. #4
    Herald of the Titans Serpha's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    London
    Posts
    2,521
    So it means I log in as normal user, (or admin as I'm the only user of the PC anyway) and not SU? And why does my user password works as SU?

  5. #5
    The Patient
    15+ Year Old Account
    Join Date
    Sep 2008
    Location
    Rochester, NY
    Posts
    264
    With a distro like Mint, where it's intended for use by a single user, or a very small number of users (like desktop Windows), the line between standard user and root is a bit more muddled. You have your own home folder and everything as a user, and since you are a member of the sudo group, you are allowed to elevate yourself to root access temporarily by using su or sudoing a command. If you create a new user without manually adding them to the sudo group, they won't be able to elevate themselves. There is technically a root account (though it won't show up on the login screen) that has the same password as the user you created during setup (most likely you).
    Solaron of <Old Guard>, Tichondrius US

  6. #6
    Herald of the Titans Serpha's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    London
    Posts
    2,521
    Ok I think I understand now, my confusion comes from years ago when I installed another distro I think it was SuSe and I had to make root and user separately and in terminal it would show joe@ for user and root@ for SU.
    Last edited by Serpha; 2015-10-06 at 11:05 PM.

  7. #7
    Seems fishy to me. Your user password working for sudo is absolutely proper, but su (switch user) should require the password of the account you are switching to in every linux distro I have used. That does not, sadly, include linux mint so I can't speak to it specifically, but I've used Slackware, Redhat, CentOS, Gentoo and Ubuntu in the past.

    It looks like the root account is not set up by default on Linux Mint. I'm not sure what they're doing to let it "work." But I suspect if you want to create a separate root password, you should type "sudo passwd root" and set one. (The first password you are prompted for will be your own.)

    That said, there's no reason to ever be running as root. Use sudo when you need root-level permissions to do something.
    “Nostalgia was like a disease, one that crept in and stole the colour from the world and the time you lived in. Made for bitter people. Dangerous people, when they wanted back what never was.” -- Steven Erikson, The Crippled God

  8. #8
    Herald of the Titans Serpha's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    London
    Posts
    2,521
    While we are on Linux subject, the only thing stopping me from going from going full time is WoW and SWTOR. I have not tried to run SWTOR on Linux but I did try WoW and it's a fail. I watched few videos on youtube and 1 or 2 guides on the net and it gives me errors. Would different distro help with that?

  9. #9
    Quote Originally Posted by Serpha View Post
    So it means I log in as normal user, (or admin as I'm the only user of the PC anyway) and not SU? And why does my user password works as SU?
    Yes, as others have said, you're not really meant to be logging in as root for extended periods - only to accomplish tasks that require it. If your account is the only one on the computer, or was the first one created, it is the one that essentially acts as the root user, and that's why it accepts your normal password. You can change it to something else without affecting your user account - tested this out myself in Mint.

    Just a note, but you should see more distinction than just the color change as to which level of user you're logged in as. When I'm logged in as root, it is red and says novie-Laptop. When I'm just logged in as a user, it is green and says novie@novie-Laptop.

  10. #10
    Quote Originally Posted by Serpha View Post
    Hello, I installed (again) Linux Mint 17.2 and I am just confused with couple of things.
    So, I just installed Mint 17.2 and created account and now I'm confused what exactly am I. For this purpose lets say my name is joe.
    So in terminal I am joe@dell with password. Now, when is do SU command (for super user) i put in my normal user password and it makes me super user, only that my name changes colour to red, it stays joe@dell. So my question is, since Linux didn't prompt me to create account or password for root, did i mess up something or what?
    You didn't do anything wrong. With the way *nix was built, some programs require root privileges as a standard user (for example, changing your password requires changing the password/shadow file, which is restricted to root for security reasons). Overtime, a few 'workarounds' emerged and eventually phased out root for the most part.

    Typically, 'sudo <command>' is what's recommended now- it allows you to perform the <command> as yourself, but with root privileges (a lot like what happens when you change your password).

    Essentially, it's the same thing that Microsoft implemented in Windows- when it warns you that something will require 'administrator privileges' and asks you to click 'Ok'. Same thing.

    Mint is a derivative of Ubuntu, which is Debian based. From what I remember, they all typically 'lock' the root account, and set your 'sudo' password to the first user created- essentially mimicking the administrator account on Windows.

    You shouldn't need root, but if you want to try it:

    # sudo passwd root
    <Enter a password for root. It can be the same as your su password if you want>
    #su - (Make sure to include the - )
    <Enter the password you set for root>

    Your prompt should change from 'joe@dell' to 'root@dell' and your home directory will be /root instead of /home/joe

  11. #11
    Herald of the Titans Serpha's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    London
    Posts
    2,521
    You guys rock. Thanks everyone for swift answers. You are better than guys at #linuxmint-chat. Most of them seem to be afk and those that respond seem to be more guessing than anything else with occasional "google it".

  12. #12
    Quote Originally Posted by Serpha View Post
    While we are on Linux subject, the only thing stopping me from going from going full time is WoW and SWTOR. I have not tried to run SWTOR on Linux but I did try WoW and it's a fail. I watched few videos on youtube and 1 or 2 guides on the net and it gives me errors. Would different distro help with that?
    Depends on the error. I played WoW briefly in Linux back in Vanilla, and go through brief periods where I switch to Linux on my desktop. My experience with WoW on Linux is (generally) a hit to performance but an increase in stability.

    Assuming you've installed proper drivers for your video card, all you should need to do is install Wine. Mint (and Ubuntu) are great for this as they'll let you install the proprietary drivers for your video card. They don't come pre-installed with the distros due to a considerable push in the Linux community to remain open source only. Stallman, for example, will immediately blacklist any distro that includes proprietary software- Mint is on his shit list for even giving the choice whether to install them or not.

    Anyway. If the drivers are correct, all you need is wine (sudo apt-get install wine). It'll create a hidden folder that'll pretend to be a Windows file system, and you can even then simply point wine to a WoW folder residing on a Windows partition.

  13. #13
    Old God Vash The Stampede's Avatar
    10+ Year Old Account
    Join Date
    Sep 2010
    Location
    Better part of NJ
    Posts
    10,939
    Quote Originally Posted by Serpha View Post
    While we are on Linux subject, the only thing stopping me from going from going full time is WoW and SWTOR. I have not tried to run SWTOR on Linux but I did try WoW and it's a fail. I watched few videos on youtube and 1 or 2 guides on the net and it gives me errors. Would different distro help with that?
    For me running WoW and SWTOR are the least of my problems. Here's a crash course on Wine. Works pretty well for me.

    #1 Unless you're on Fedora, never install the Wine version that comes with the Distro. I think it's 1.6.2 and it's horribly out of date.
    #2 Never get the official version either cause even though it's up to date, as of this post it's 1.7.52, it's also miserable out of date.
    #3 Install Wine-Staging cause it has every patch being made for Wine just already applied to Wine.
    #4 Always enable CSMT for a big speed boost.
    #5 Install Winetricks "sudo apt-get install winetricks"
    #6 Make sure to use 32-bit Wine cause 64-bit isn't very compatible. Make sure to delete the .wine directory and copy paste this into Terminal "WINEARCH=win32 WINEPREFIX=~/.wine winecfg"
    #7 The .wine directory contains all your Windows applications.
    #8 Install Microsoft Core Fonts. "sudo apt-get install ttf-mscorefonts-installer"
    #9 Use Winetricks to install anything that certain applications require. WoW doesn't require anything.

    Now here's a crash course on Ubuntu/Mint.
    #1 If Nvidia use latest Official drivers.
    #2 If AMD/Intel use latest open source drivers.
    #3 Unless you're on Arch you're usually not using the latest version of some software. Learn how repositories work.
    #4 Install latest version of Java for Minecraft.
    #5 Only Chrome can play Netflix.
    #6 .deb is Debian/Ubuntu/Mint's version of .MSI.
    #7 Disable Vsync if you're on open source drivers by putting "vblank_mode=0" in "sudo gedit /etc/environment".
    #8 Install Gedit if your distro doesn't come with it, you'll thank me. "sudo apt-get install gedit".
    #9 Update to the latest kernel. Just remember that usually Nvidia and AMD official drivers don't play nice with latest kernel. Only update kernel if you plan to use open source graphic drivers.
    Last edited by Vash The Stampede; 2015-10-06 at 11:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •