LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-06-2006, 10:48 PM   #1
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Rep: Reputation: 15
Admin properties won't open in Ubuntu 6.06.1


I tried to alter my network settings, but the network set-up window wouldn't open. This also affects other admins i.e. printer. I thought it might have something to do with a stuck login window, maybe.
 
Old 11-07-2006, 05:04 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Try this from the terminal:

sudo network-admin

I don't know why the menu items don't work though...
 
Old 11-07-2006, 08:39 PM   #3
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by matthewg42
Try this from the terminal:

sudo network-admin

I don't know why the menu items don't work though...
This is what happened
----
I typed: sudo network-admin

Answer: unable to look-up name va gehostbyname
------

The problem may be that I had set up a network with with another computer, then decided to change the name of this computer (not the other one). When I changed the name in the network set up it gave a msg: "If you change the name you may not be able to access some files." Well, I thought that meant on the other computer and not the admin files. Next thing I know I couldnt reopen the networking set-up. If I can't resolve this I might have to reinstall Ubuntu.
 
Old 11-08-2006, 03:56 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by klarsin
This is what happened
----
I typed: sudo network-admin

Answer: unable to look-up name via gehostbyname
------

The problem may be that I had set up a network with with another computer, then decided to change the name of this computer (not the other one). When I changed the name in the network set up it gave a msg: "If you change the name you may not be able to access some files." Well, I thought that meant on the other computer and not the admin files. Next thing I know I couldnt reopen the networking set-up. If I can't resolve this I might have to reinstall Ubuntu.
Aha, interesting. I did a quick google an found this thread in the ubuntu forums which looks to be the same thing.

Just to verify that I understand the problem, can you tell me if you get the same thing when you try to sudo any other command?

Also, can you post your /etc/hosts file?
 
Old 11-08-2006, 07:57 PM   #5
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by matthewg42
Aha, interesting. I did a quick google an found this thread in the ubuntu forums which looks to be the same thing.

Just to verify that I understand the problem, can you tell me if you get the same thing when you try to sudo any other command?

Also, can you post your /etc/hosts file?
I didn't get anything out of the ubuntu link that helped.

Sudo anything - gets nothing.

/ect/hosts - denies access

From the dropdow menus in admin, only the following open: device mgr, network tools, printing, system log, system monitor.

The only time I get a login or password window is upon startup. I can't setup any hardware including the modem.
 
Old 11-08-2006, 08:26 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
In terminal mode, enable the root user account like so:
Code:
sudo passwd root
<password>
(New root password when prompted)
su    (to take on root powers)
<new root password>
Now try the same commands (but without the sudo part)
 
Old 11-08-2006, 10:24 PM   #7
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany
In terminal mode, enable the root user account like so:
Code:
sudo passwd root
<password>
(New root password when prompted)
su    (to take on root powers)
<new root password>
Now try the same commands (but without the sudo part)
Typed: sudo passwd root

Response: unable to look up powerspec-2 via guesthost name()

Powerspec2 is the computer name.

I think at this point it might be easier to reinstall ubuntu, being I havnt created any files yet.
 
Old 11-09-2006, 02:57 AM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
OK from the Ubuntu forum post... what it means is that the missing loopback name in the /etc/hosts is causing sudo to fail. By the way, you should be able to read your /etc/hosts file to post it here - it should be readable by all.

If the above description is an accurate representation of the problem (I can't tell without seeing your /etc/hosts file), you need to reboot in single user mode and edit your /etc/passwd file from there. Please post your /etc/hosts file so I can see what is missing. If you really can't read it that it might be the permissions which are wrong. If this is the case, paste the output of this command here:
Code:
ls -lF /etc/hosts
 
Old 11-09-2006, 03:13 AM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
I had similar trouble last week: I changed my hostname & rebooted. Thereafter I couldn't use sudo.
The solution was to reboot into "Safe" or "Recovery".
That leaves you logged in as root.

Make sure the file /etc/hosts has the line
127.0.0.1 localhost myhostname

Set your hostname hostname myhostname

But for some reason, that didn't update the file /etc/hostname, so I had to edit that file so it held my hostname, rebooted, and all was well.
 
Old 11-09-2006, 07:55 PM   #10
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by matthewg42
OK from the Ubuntu forum post... what it means is that the missing loopback name in the /etc/hosts is causing sudo to fail. By the way, you should be able to read your /etc/hosts file to post it here - it should be readable by all.

If the above description is an accurate representation of the problem (I can't tell without seeing your /etc/hosts file), you need to reboot in single user mode and edit your /etc/passwd file from there. Please post your /etc/hosts file so I can see what is missing. If you really can't read it that it might be the permissions which are wrong. If this is the case, paste the output of this command here:
Code:
ls -lF /etc/hosts
Still can't get into it. Even tried to boot via recovery, but it hung and had to manually reboot the machine.

If my memory serves me correctly, 127.0.0.1 localhost may have been accidentally deleted instead of doing a name change. If that is of any consequence.
 
Old 11-10-2006, 03:12 AM   #11
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by klarsin
Still can't get into it. Even tried to boot via recovery, but it hung and had to manually reboot the machine.

If my memory serves me correctly, 127.0.0.1 localhost may have been accidentally deleted instead of doing a name change. If that is of any consequence.
What do you mean "can't get to it"? Can you even log in? I'm not quite understanding where the process is failing. OK, tell me exactly what fails when you try this process:
  1. Open a terminal window (Applications -> Accessories -> Terminal)
  2. Type in the command
    Code:
    ls -lF /etc/hosts
    . If there is any output please paste it here.

If you can't enter recovery mode then to fix it you'll need to boot from the live CD, mount your hard disk and edit the file that way.
 
Old 11-11-2006, 10:11 AM   #12
klarsin
Member
 
Registered: Oct 2006
Distribution: Ubuntu / Mepis
Posts: 144

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by matthewg42
What do you mean "can't get to it"? Can you even log in? I'm not quite understanding where the process is failing. OK, tell me exactly what fails when you try this process:
  1. Open a terminal window (Applications -> Accessories -> Terminal)
  2. Type in the command
    Code:
    ls -lF /etc/hosts
    . If there is any output please paste it here.

If you can't enter recovery mode then to fix it you'll need to boot from the live CD, mount your hard disk and edit the file that way.
Typed: 1s -1F /etc/hosts
Reply: command not found

/etc/hosts did not exist before I restarted today. The boot prompt said that the computer name was invalid and began diagnositc automatically which fixed this so I could see the etc/hosts file. I still cannot open the network file to set up network and to veiw the hosts from there.

Here is the hosts file.
-----
127.0.0.1 localhost Powerspec 2 Powerspec 2 Powerspec 2 Powerspec 2

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.0.1 Powerspec 1
-----
Hope this tells you something.
 
Old 11-11-2006, 11:14 AM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Hope this tells you something.
It is a good start!
Your /etc/hosts file is wrong.
It looks as though you have tried to name your machine both "Powerspec 1" and "Powerspec 2". These are both bad names as hostnames should not have spaces in them. Use your favourite editor to make your /etc/hosts file look exactly like this:
Code:
127.0.0.1          localhost 
192.168.0.1        powerspec
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now you need to set your hostname properly, as root execute this command:
hostname powerspec
Check that this has worked properly:
cat /etc/hostname
You should get a reply of powerspec
If not do this as root, (you should be as I think you are logged into "Recovery" kernel, in which case you are root):
echo powerspec > /etc/hostname

Then reboot, into your normal kernel (not the Recovery one).
Things should be a lot better.
HTH

Last edited by tredegar; 11-11-2006 at 01:44 PM.
 
Old 11-11-2006, 12:04 PM   #14
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by klarsin
Typed: 1s -1F /etc/hosts
Reply: command not found
ls with an l (lower case L), not 1 (digit one).
 
Old 11-11-2006, 01:43 PM   #15
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Thanks Matthew for pointing out the spelling for "ls".
I note a serious mistake in my previous post:
echo powerspec > /etc/hosts
Should read:
echo powerspec > /etc/hostname
I have edited my post to reflect this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! Delete myself from the admin group - UBUNTU Micro420 Linux - General 3 11-01-2006 06:33 PM
Ubuntu - lost OEM account - NO admin power! sethis Linux - Newbie 4 08-26-2006 10:38 AM
WARN: Ubuntu Admin Password Leak furfurdemon666 Linux - Security 6 03-13-2006 05:45 PM
User admin and N/w admin on Gnome hangs ssrini *BSD 2 07-28-2005 07:55 AM
Microsoft admin that is open minded to change brian5259 Linux - Newbie 4 09-24-2003 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration