Major Error of installing updates

Asked by Amar Singh

I keep trying to install stuff from synaptic but it doesn't let me start with administrative privileges. It's not even in the menu anymore! Here is the message I get when I try to run it:
"Starting without administrative privileges

You will not be able to apply any any changes. But you can still export the marked changes or create a download script for them."

I have already seen the Ubuntu forums about this but those things don't work and I don't want to reinstall Ubuntu again. This also means I can't upgrade to 7.10. HELP ME PLEASE!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Witold Krakowski (wkrakowski-gmail) said :
#1

Please try the following from a terminal:

gksudo synaptic

this should start it with administrator privileges and ask you for password. Let me know whether it works.

Revision history for this message
Amar Singh (amar-singh-2006) said :
#2

No sorry. It doesn't work. When I tried it before, it asked for my password as it should, but when I ran Update Manager, it still gave error messages.

Revision history for this message
Amar Singh (amar-singh-2006) said :
#3

I have also tried sudo synaptic.

Revision history for this message
Amar Singh (amar-singh-2006) said :
#4

Just now I tried Alt +F2 and ran gksudo synaptic, the place to type my password comes up, but afterwards I get this message:
"Failed to run synaptic as user root.

The underlying authorisation mechanism (sudo) does not allow you to run this program. Contact the system administrator."

Revision history for this message
Witold Krakowski (wkrakowski-gmail) said :
#5

Can You try booting in the recovery mode and see whether it works?

Revision history for this message
Amar Singh (amar-singh-2006) said :
#6

Synaptic isn't in my Menu anymore as well as loads of administrative programs. I can't use any programs which require a administrator's password.
I'll try Recovery Mode.

Revision history for this message
Amar Singh (amar-singh-2006) said :
#7

Nope it didn't work.

Revision history for this message
Amar Singh (amar-singh-2006) said :
#8

Didn't work in recovery mode. Don't know what to do.

Revision history for this message
Allen Chemist (alchemist) said :
#9

If I'm reading this correctly, you can't do anything as an administrator, that is to say it's not limited to package management.

Can you tell me any output from the following:
1. In a terminal window, type
       sudo -i
    This should ask for your password, and if it works correctly, you should end with a [root@yourhost:~]# <-- note the # on the end, not the normal $. If it did work, ignore #2 and #3 below, and post back here that it worked.

2. If that fails, can you tell me the output of the command:
     groups yourusername

3. Finally, do the following command to grab the dates
     ls -l /etc/pam.d/

Revision history for this message
Amar Singh (amar-singh-2006) said :
#10

Ok. The Output of that command was : amarpreet adm dialout fax cdrom floppy tape audio dip video plugdev scanner netdev lpadmin powerdev fuse

Revision history for this message
Amar Singh (amar-singh-2006) said :
#11

Number 1 didn't work - it said: "Sorry, user amarpreet may not run sudo on amarpreet-desktop". Would creating a new user work? If it would, how can I create a new user without administrative privileges?

Revision history for this message
Allen Chemist (alchemist) said :
#12

You will need t get yourself into the admin group.

When you turn the computer on, in the grub screen (where you choose recovery mode or not), do the following:
1. Press Esc to stop the countdown to regular boot
2. Move down to one of the recovery items
3. press e
4. move down the the line that looks like 'kernel /vmlinuz...', and press e again
5. you should see at the end of the line something like 'ro single'. After that, type init=/bin/bash
6. press enter, which should return you to the list with 'root', 'kernel', 'initrd'. From here, press b to boot
7. This is now a read-only recovery console, which is very limited. The first step will be to make it writable. type mount -o remount,rw /

The above instructions will put you to a root command prompt without a password (this is useful if you've forgotten your password)

Now, to add you to the admin group:
using your favourite text editor (pico?), we will edit /etc/group.
First, take a backup
cp /etc/group /etc/group.bak
Next, edit it
pico /etc/group

find the line that starts with admin (mine is)
admin:x:110:myname,anothername,anothername

add your name to the end of that line. Save and quit and you should be good to go.

Just for good measure, while you are in the recovery console you should check the sudoers file, and ensure 'admin' is still the group that does have the right to do sudo, and set the root password so this is is easier if it happens again!

Check the sudoers file:
** Be very careful on any change to this - breaking this file can render your system unusable **
use your favourite editor to edit the file /etc/sudoers
you should find a line (most likely the last line) that reads exactly like this:
%admin ALL=(ALL) ALL

%admin means the admin group, so you are good to go.

Set the root password:
type passwd. It will ask you for the password twice. In the future, if you've forgotten your own password, or somehow you are not in the admin group anymore, you can use the root account to fix these things.

Rebooting:
type reboot or press ctrl+alt+del

Can you help with this problem?

Provide an answer of your own, or ask Amar Singh for more information if necessary.

To post a message you must log in.