Jump to content
  • Advertisement
Sign in to follow this  
Halsafar

Modify User Privledges

This topic is 4832 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay when you install Ubuntu it does not give you a choice to create a root password, it simply allows u to create 1 user/pass which has the rights to modify the root password via sudo and a few other various root functions. So on my first boot to Ubuntu GUI I "sudo passwd root" I believe was the command and set a root password. Then I took away a bunch of privledges from that first account. Now, you cannot log into the GUI as root. I need to know how to manually modify the priveledges of a user via the shell. Since I for some reason can no longer use that first user account to modify the User Accounts via the GUI.

Share this post


Link to post
Share on other sites
Advertisement
The su command allows you to switch users. You can almost certainly still log in as root from a console.
Look at the usermod command to modify the groups a user belongs to: to be able to su to the root account, a user must belong to the wheel group.

Share this post


Link to post
Share on other sites
Ubuntu is like Mac OS X where the root user is disabled by default. On a standard install running su to become root will fail - if you need to do something that requires root privileges use sudo instead. You can run a shell with root privileges with:
sudo -s

More info here.

Share this post


Link to post
Share on other sites
Okay, logged into GUI as Hal -- the only other user, which cannot do any root stuff.
Open up termine and type "sudo -i"
Then it asks for the password, so I try the root pass and it fails, I try the pass as Hal and it reports the incident attemp cause Hal is not the in sudo user list.

Share this post


Link to post
Share on other sites
Some questions:
Hal was the first user you created during the install?
What were the privileges you took away from the first account?
Did you also try su (it shouldn't work, but perhaps now that you've given the root user a password it might)?

sudu su might also work, but probably won't since sudo -i didn't.

You also might want to consider whether you really want a root user at all. The ubuntu wiki I linked to above has a decent overview of the pros and cons. As far as i'm aware, there aren't many reasons why you'd want to in Ubuntu - you can do just about anything with sudo in an admin account.

One other thing I can think of is adding Hal to the sudoers file (which may be a bit difficult if you can't access the root user or get root privileges). Read the sudo man page and the info in the /usr/share/doc/sudo/ directory.

Share this post


Link to post
Share on other sites
Not sure what to tell you. If I had access to your machine I might be able to get things working right - but if you're still having problems my advice is to reinstall.

Once you've done that ask yourself whether you actually need a root user with a password in Ubuntu. Can you get by with an admin account and sudo?

Share this post


Link to post
Share on other sites
I cannot get by at all how it is setup.

I do not know how to modify priviledges via the shell as root.
I can no longer do it via Hal because I took away those abilities.
Since I took away those abilities for Hal I cannot use the GUI for anything! Networking, Sharing, User Group Modifications, etc.

I need to give Hal his rights back somehow via root.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
(A slightly screwy way of doing it, but...)

To log in to desktop with root:
using one of the text terminals (ctrl-Alt-F1), log in as root and edit the file /etc/gdm.conf [1] and change the line

AllowRoot=false

to

AllowRoot=true

then restart gdm and log in as root and away you go.

Alternatively (from memory):
change /etc/sudoers to include your desired user. [2]

Alternatively 2:
As root in one of the terminals run the command:
adduser admin
should restore s ability to sudo

[1] I'm not sure this is the right path. The file you need to edit is called gdm.conf anyway.

[2] As root, edit the sudoer file using the command visudo. Check the man page for visudo for how it works. I'm not at my Ubuntu box just now, so I can't check.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!