How do I give myself root privileges?

Discussion in 'OT Technology' started by deusexaethera, Dec 19, 2005.

  1. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I'm still trying to iron out my install of Ubuntu 5.10. It seems that, in an effort to make Linux more friendly, the good people at ubuntulinux.org permanently disabled the root# account. This is something of a problem, since root# owns everything on my RFS partition and I can't tweak any of the stuff I really need to in order to get all my shite in order. So how do I make my user account into a SuperUser account?
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    boot in single user mode or use a liveCD with root access.
     
  3. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Just do sudo su.

    Edit: If you want to enable the root account, do sudo passwd root and change the root password. I've never seen this to be necessary.
     
  4. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I've already changed the root password using the command you specified. What I was hoping for was the ability to grant full root privileges to a non-root account, so I wouldn't have to use the "sudo" utility or login as root on the console screen. I suppose, though, that such an ability would undermine Linux's (relatively) famed security.

    Basically, I've found that I can't edit GRUB to boot Windows by default (it's a work computer, it has to run MS Office), or automount my Windows drive, or automount my USB hard disks so I can actually try to access my files when I'm not running Windows, unless I'm logged in as root. And then I have to figure out how to write the scripts to do all the automation crap, too.

    I find that having to log in as root, when there are no protections to keep me from doing so inappropriately, is a waste of time and the workaround is unnecessary. I'd much rather do my stuff using the root account and bite the bullet if I screw something up. Such is not to be, it seems.
     
  5. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Well, nothing is stopping you from logging in as root. It's just a bad idea (same as running Windows as Administrator all the time).

    You can get your Windows drive to automount with everything owned by your normal user by editing /etc/fstab. I think I described how to do it in a previous thread. I think USB mass storage devices should be automounted in Gnome. At least, they always have when I've plugged them in.
     
  6. Aimless

    Aimless Resident drunkey

    Joined:
    Nov 5, 2001
    Messages:
    2,534
    Likes Received:
    0
    Location:
    Wisconsin
    No can do.

    Edit: And it's not Ubuntu's fault. That's just how linux works.
     
  7. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Linux might prohibit granting root privileges to user accounts, but Ubuntu specifically states that it prohibits logging on as root on the login screen.

    That said, I'm becoming more acclimated to having to log in as root in a console window. I might just make a shell script that will log me in as root whenever I open the console.
     
  8. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    1. I'm pretty sure that the Windows Administrator account is unlike the Linux root account in that it doesn't allow you to subject Windows to a slow, painful death if you so desire.

    2. My USB drive won't automount. In fact, I can't read any floppy disks either. I can hardly wait to try a CDROM. I can just bet that nothing will automount at all, and I'll find out that making it work will be a tortuous process.
     
  9. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Sure you can. As Administrator, you can access anything on the system. Try logging in as Admin, selecting everything in your C:\Windows folder, and hitting Delete. It won't let you delete a few things that are currently in use, but it'll let you do serious damage.

    Oh, you can change that. From the commandline, do sudo gdmsetup. In the Seucrity tab, click "Allow root to login with GDM." Problem solved.
     
  10. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,458
    Likes Received:
    12
    Ofcourse you can disable the root prohibition that Unbuntu applied.

    Or you can create a user with the uid of 0. But depending on how Unbuntu locked root down, this may not work either.

    But sudo is suggested, unless you're really savvy in recovering the OS from accidents. Which is quite easy to do and figure out granted you have access to the local console with a cdrom/dvdrom or net boot device.
     
  11. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,488
    Likes Received:
    616
    That's basically just making a new root user with a different name. There's no need and no point. The point of not logging in as root is that you can't accidentally delete whole directory trees or mess up your system. It's not the name "root" that's the problem, it's the power.

    That's why sudo exists. You can use root powers whenever you need to, but you have to do it intentionally.
     
  12. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    (tries to remember the last time he did something to his computer by accident)

    (grumbles)

    Point taken. Not that I need that kind of hand-holding.
     
  13. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Heh, the worst thing I ever did to my computer by accident was not while logged in as root, actually. I had created a symlink called ~adam, and went to delete it with rm -rf ~adam. This, of course, deleted my home directory :embd:

    You may not need that kind of hand-holding, no person really does. However, the idea of not being root all the time is also that a program or script that you run can't completely screw up your computer. Just as running as a non-Admin account on Windows keeps you safer from spyware and adware (since they can't do as much damage without Admin priveleges), not running as root on Unix does the same thing.
     

Share This Page