I just recently installed CentOs 6
A simple sudo or su doesn't work for me
Here is the exact trace
[nipun@dhcppc0 ~]$ sudo su
[sudo] password for nipun:
nipun is not in the sudoers file. This incident will be reported.
[nipun@dhcppc0 ~]$
I "nipun" am as such the only user.I tried running visudo which gave me the following trace
[nipun@dhcppc0 ~]$ visudo
visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied
[nipun@dhcppc0 ~]$
[SOLVED] Cannot become root
-
- Posts: 4
- Joined: 2011/10/26 06:54:38
- Contact:
Re: Cannot become root
Catch22. You have to be root to run visudo. You have to be in /etc/sudoers before you can sudo. To fix this you will need to know the root password and use
[code]
su -
visudo
<now add yourself to the sudoers list and save it>
[/code]
[code]
su -
visudo
<now add yourself to the sudoers list and save it>
[/code]
-
- Posts: 4
- Joined: 2011/10/26 06:54:38
- Contact:
Re: Cannot become root
Thanks :-)
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
[SOLVED] Cannot become root
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature. I presume from your thanks that the thread can be marked [SOLVED] for posterity, so I am doing so on your behalf.
Re: [SOLVED] Cannot become root
Tried this:
"permission denied"
Tried booting from livecd, mounting:
sudo mount /dev/sda1 /mnt
then
sudo visudo -f /etc/sudoer
didn't find file
booted into CentOS (6.2)
there's a
/usr/bin/sudo (with an X through it - need root access)
and a
/etc/sudoers.d (same thing as above - need root access)
I understand need root access to GET root access.
Thought I had it, set it up and was using it.
Seem to have lost it. Need it back.
One more detail:
user is: home-pc
Anyone?
"permission denied"
Tried booting from livecd, mounting:
sudo mount /dev/sda1 /mnt
then
sudo visudo -f /etc/sudoer
didn't find file
booted into CentOS (6.2)
there's a
/usr/bin/sudo (with an X through it - need root access)
and a
/etc/sudoers.d (same thing as above - need root access)
I understand need root access to GET root access.
Thought I had it, set it up and was using it.
Seem to have lost it. Need it back.
One more detail:
user is: home-pc
Anyone?
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: [SOLVED] Cannot become root
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.
After reading those links you should realize why you should not hijack threads as you have done. I see you have already started a [url=https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=37931&forum=56]fresh topic[/url].
After reading those links you should realize why you should not hijack threads as you have done. I see you have already started a [url=https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=37931&forum=56]fresh topic[/url].