Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Made myself regular user instead of superuser, Can't do system things anymore, really need help
AshleyC
post Feb 4 2008, 10:03 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 4-February 08
Member No.: 13,304



Hello,

I did a very stupid thing: I accidentally took my own rights away from my user (I use Ubuntu in Dutch, so I don't know the exact phrases) but before I changed it, I could install things, change users (obviously), and so on, all the things the superuser could do, and now I can't anymore.

Is it possible to get it right again without having to re-install ubuntu? I allready tried to login with the root-account, but that doesn't work: I get the message that the password or the login-name aren't correct. I don't really get how this is possible because I don't remember changing the root-password, so I thought it would be the same as my user. The name I have to use to login with the root is just "root", right?

Thanks anyway,
Ashley
Go to the top of the page
 
+Quote Post
arochester
post Feb 4 2008, 10:55 AM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 22
Joined: 20-December 07
Member No.: 13,207



Reboot and select 'recovery mode' from the grub menu then:
QUOTE
useradd -G admin <your account name>
this adds your account to the admin group, giving it sudo rights you can also edit the sudoers file directly, with:
QUOTE
visudo
You can't easily log into "root" because Ubuntu with sudo doesn't work that way.
Go to the top of the page
 
+Quote Post
AshleyC
post Feb 4 2008, 11:54 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 4-February 08
Member No.: 13,304



Thanks for your help, I didn't know Ubunt worked like that. The useradd -G admin command doesn't work though. I've tried it 3 times now and it still doesn't work...
Go to the top of the page
 
+Quote Post
arochester
post Feb 4 2008, 03:53 PM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 22
Joined: 20-December 07
Member No.: 13,207



Then try the visudo option. I lost superuser status, through some kind of corruption and that is how I put it back.
Go to the top of the page
 
+Quote Post
AshleyC
post Feb 4 2008, 04:21 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 4-February 08
Member No.: 13,304



QUOTE (arochester @ Feb 4 2008, 03:53 PM) *
Then try the visudo option. I lost superuser status, through some kind of corruption and that is how I put it back.


How did you do that exactly? I did something with the visudo, but I didn't really know what to do...
Go to the top of the page
 
+Quote Post
arochester
post Feb 5 2008, 06:38 AM
Post #6


Whats this Lie-nix Thing?
*

Group: Members
Posts: 22
Joined: 20-December 07
Member No.: 13,207



Copied from http://ubuntuforums.org/archive/index.php/t-150021.html

"Use the 'Recovery Mode from the Grub menu at startup.

Recovery mode will drop you to a root prompt. If you don't see the GRUB menu at startup then you probably have to press the ESC key to view it, as its sometimes hidden and only revealed when you hit the ESC key.

Once at the root prompt you can use this command to edit the /etc/sudoers file..

visudo #this command does on thing. It opens the sudoers file for editing

My sudoers file looks like this. Note the last line where I give my user sudo privileges. This is the line that would need to be added by those who, for whatever reason, don't have sudo privileges.

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults

Defaults !lecture,tty_tickets,!fqdn

# User privilege specification
root ALL=(ALL) ALL
mustard ALL=(ALL) ALL


You can see my username on the bottom line. You would need to add your username to the bottom as I have done.

Assuming your user name was "bob'', then the line that would need to be added would be..
bob ALL=(ALL) ALL

This is just one way of doing it. Some sudoers files are set up with an admin group called 'adm'. Users are then added to the adm group, and a line in the sudoers file that looks like this below gives members of the 'adm' group admin access.
%adm ALL=(ALL) ALL

If you decided to do it this way you would create the line above at the bottom of your sudoers file then do this command (substituting your username in the appropriate place)..

adduser your_username adm"
Go to the top of the page
 
+Quote Post
AshleyC
post Feb 5 2008, 11:11 AM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 4-February 08
Member No.: 13,304



Thank you so much! (It worked, and thanks to all this I learned a lot of things, although I have still a long way to go biggrin.gif)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2017 - 02:07 AM