PDA

View Full Version : update and root problems


mbascombe
6th May 2009, 02:04
I recently ran into a couple problems.
When I try to do a upgrade by running the following command "aptitude full-upgrade". I get the following error.

Last login: Tue May 5 18:43:37 2009

matthew@server1:~$ aptitude full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
matthew@server1:~$



To correct that I tried giving myself root access and got the following error after issuing the following command
matthew@server1:~$ sudo passwd root
[sudo] password for matthew:
matthew is not in the sudoers file. This incident will be reported.
matthew@server1:~$ sudo su
[sudo] password for matthew:
matthew is not in the sudoers file. This incident will be reported.
matthew@server1:~$



Can someone please help me with this problem.
I'm using Ubuntu 9.04 with ISPConfig 3.
This problem only started recently and I had been running with no problems for the last 3 wks

falko
6th May 2009, 23:13
Did you somehow modify the /etc/sudoers file?
Do you have another user that you can log in with?
Did you set a root password before? Then you can log in as root directly.

mbascombe
7th May 2009, 02:16
there was no changes to the /etc/sudoers file. I followed the how to set up and and only created one user. As I said had no problem until recently. I checked the /etc/sudoers file but can't make any changes since I don't seem to have root access. For security purpose I can't log in as root

falko
7th May 2009, 17:57
I guess there's something wrong with the sudoers file. Since you cannot access it, the only way to repair the system is to use a Live CD such as Knoppix. This tutorial should give you the idea: http://www.howtoforge.com/how-to-reset-a-forgotten-root-password-with-knoppix