ubuntu, I can no longer become root or have root rights
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ubuntu, I can no longer become root or have root rights
Hi,
I installed ubuntu without ever being asked for a root password (afaik).
I created a user named t with password xxx.
I logged onto the system.
I was able to start a "root terminal" specifying t's password xxx.
I could never start a terminal and do a "su".
I used visudo to add t to the sudo users.
I changed the userid t to ts and the password from xxx to yyy.
- Now I can't start a root terminal - it says "child process failed -1".
- I can't sudo because the user t changed to ts and is no longer in the sudoers file.
- I can't "su root" from a terminal window - password fail with both password xxx and yyy.
I need root rights - and I am the only user of the machine, can anyone see a solution ?
There is no root account under Ubuntu, so using "su" to become root will fail. By design, you are supposed to issue any commands that need root access by sudo (your user account is already a sudo'er.
PS
I was not aware that you could CHANGE a user name....You can certainly create new users and delete users---and you can change the privileges of exisiting users
I don't know how you got yourself into that, but I suppose you could just boot into single-user mode (Press Esc before booting to enter the Grub menu and choose 'Recovery Mode') and add yourself to /etc/sudoers. Barring that, you could use any Linux LiveCD to edit it and fix the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.