LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-30-2015, 09:02 PM   #1
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Rep: Reputation: Disabled
I think I messed up my administrator directory.


Hi I purchased a cheap eMachine laptop (with the lil' gimpy atom processor) and it had windows 7 on it, but unfortunately it was very sluggish. So a coworker told me about linux and gave me a live USB of his and instructed me on how to install it onto my laptop.

Well I took it a step further and got rid of windows altogether which I now regret because I can't play a lot of games now, but I digress.

I've never used linux and I had heard that if you learned how to use the command prompt to operate the system you could perform tasks much quicker and whatnot so I started messing around with commands and the first thing I tried to accomplish was changing my name inside the command prompt. And I was successful, kinda. The system is called "linuxlite" and I changed my name to "MrBojangles". Unfortunately since I have done this it won't let me download anything from ubuntu, the web nada. I also get error messages on startup claiming that there is a problem with a checkbox to send the information off somewhere.

Unfortunately as well, I messed this up several months ago and just forgot about it and now I really want to get linux puppy and other operating systems (because why not they're usually not bigger than 2gb anyways), but I can't download anything other than maybe a picture off the internet.

But yeah when I try to install anything through the command prompt (apt-get install ****) it says: 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?
linuxlite@Mr:~$

Does anyone know how I can fix this? Or maybe reset the operating system to the original settings?

Also sometimes it will ask me for an administrator password to do certain things like I think I wanted to install a game off of steam (even though I knew it probably wouldn't work out) it would ask me for this password and it was never right. I mean there's only one password created on this computer and I am the administrator so how can I be wrong?
 
Old 11-30-2015, 09:23 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Try using

Code:
sudo apt-get install w3m    <---I picked this arbitrarily.  What's important is what happens when you try the command.  w3m is a text web browser.
and let us know what happens.

I say that because LinuxLite is based on Ubuntu, and Ubuntu has a somewhat unusual implementation of sudo. The "root" user ("super user," "administrator") is hidden in Ubuntu. Instead of using "su" ("substitute user") to become root to do administrative tasks, one uses "sudo" (which, in UbuntuLand, means "Super User do"). Sudo will then ask for your user password and, once it is correctly entered, will execute the administrative task. And don't worry about those semantics, at least not yet. Let's just try something.

This article will tell you more. http://linux.about.com/od/ubuntu_doc/a/ubudg24t4.htm

Linux is not Windows; it is different. So give that command a shot and report back.
 
Old 11-30-2015, 09:31 PM   #3
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Here's what it said. Should I try the f install?

linuxlite@Mr:~$ sudo apt-get install w3m
sudo: unable to resolve host Mr.Bojangles
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libnss3-1d : Depends: libnss3 (= 2:3.19.2-0ubuntu0.14.04.1) but 2:3.17.4-0ubuntu0.14.04.1 is to be installed
libnss3-nssdb : Depends: libnss3 (= 2:3.19.2-0ubuntu0.14.04.1) but 2:3.17.4-0ubuntu0.14.04.1 is to be installed
libqt4-declarative : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqt4-opengl : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqt4-svg : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqtgui4 : Depends: libqt4-declarative (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
Depends: libqtcore4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
 
Old 11-30-2015, 09:49 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
You might want to run 'apt-get -f install'
Error messages are your friend. They tell you what went wrong and where to start looking for a fix.

Try running

Code:
sudo apt-get -f   --followed by
sudo apt-get clean
then retry installing w3m (which is quite a nice piece of work, by the way) and report back. (I'm probably done for the night, but someone else will pop up to help.)

Learn more here: http://askubuntu.com/questions/58378...t-f-install-do

You can also run man apt in a terminal to learn more about apt. Note that man (manual) pages are often not very newbie friendly.

And remember, we were all newbies once.

By the way, welcome to LQ.

Last edited by frankbell; 11-30-2015 at 10:04 PM. Reason: Add the "sudo" to the Ubuntu commands.
 
Old 11-30-2015, 09:55 PM   #5
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thankyou so much and I willl definitely bare these in my bookmarks lol
 
Old 11-30-2015, 10:05 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I've updated my previous post to include the "sudo."

Good luck and don't give up. We'll get you there.

Last edited by frankbell; 11-30-2015 at 10:06 PM.
 
Old 12-01-2015, 03:24 PM   #7
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Would my problem be that because I changed my hostname (to mrbojangles) that the system no longer recognizes me as the administrator? I tried reinstalling w3m and it says "unable to resolve host mrbojangles" so I tried sudo leafpad /etc/mrbojangles - it opened the notepad up but warned me that: The owner of /home/linuxlite/.config/ibus/bus is not root!

Last edited by MrBojanglee; 12-01-2015 at 03:26 PM.
 
Old 12-01-2015, 03:37 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by MrBojanglee View Post
Would my problem be that because I changed my hostname (to mrbojangles) that the system no longer recognizes me as the administrator?
Quote:
Code:
sudo: unable to resolve host Mr.Bojangles
How, exactly, did you change the name on your system? Whatever you did, it was wrong, and that's what has broken your network connection. If you know what you did, I recommend you undo it. If you don't know what you did, I recommend you take better notes when you make changes to the system.

Last edited by suicidaleggroll; 12-01-2015 at 03:38 PM.
 
Old 12-01-2015, 04:25 PM   #9
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
I just found the exact command. I saved it in a notepad. The command was "sudo gedit /etc/hostname" When I try using the command again it says this:

udo: unable to resolve host linuxlite
Invalid MIT-MAGIC-COOKIE-1 key
** (gedit:2729): WARNING **: Could not open X display
Invalid MIT-MAGIC-COOKIE-1 keyerror: XDG_RUNTIME_DIR not set in the environment.

(gedit:2729): Gtk-WARNING **: cannot open display: :0.0

Last edited by MrBojanglee; 12-01-2015 at 04:29 PM.
 
Old 12-01-2015, 04:45 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You said above that you changed the hostname to mrbojangles, but your output implies you used Mr.Bojangles. Periods are only allowed in hostnames when they serve to delimit components of a domain name.

Since you can't open X applications, how about editing it with one of the command line text editors (vi, pico, nano, etc.)? Just remove the period from it, the rest should be fine, and see if that fixes your problem.

Apparently having a period in the hostname can mess with DNS.

Last edited by suicidaleggroll; 12-01-2015 at 04:49 PM.
 
Old 12-01-2015, 04:50 PM   #11
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Alright my hostname is now linuxlite. I still can't download anything from ubuntu or the internet and I'm still getting error messages it also tells me when I try to install the web browser w3m (sudo apt-get w3m) "unable to resolve host linuxlite"

And yeah everything was fine up until I changed my hostname. I also noticed that ubuntu won't update and I cleaned my cache and tried to force all unneeded dependencies to be removed.
 
Old 12-01-2015, 05:25 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Can you post the o/p of the following
Code:
cat /etc/sysconfig/network

cat /etc/hosts

cat /etc/resolv.conf

cat /etc/nsswitch.conf
 
Old 12-01-2015, 05:32 PM   #13
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
It said for the first one that no file or directory exists...

The second one said this (I changed my name back to MrBojangles but without the period):

27.0.0.1 MrBojangles
127.0.1.1 MrBojangles

# 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

For the third one:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

nameserver 127.0.1.1
search hsd1.tx.comcast.net

And then the fourth one:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat

hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
 
Old 12-01-2015, 05:50 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, the top of my (Centos 6.7) /etc/hosts starts with
Code:
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
If the ifcg-eth0 (or equiv) file is using
Code:
BOOTPROTO=dhcp
then I'd expect your wanted name eg MrBojangles to be added to the end of the 1st list.
If its 'static', then you'd have a separate line similar to
Code:
192.168.1.100	MrBojangles
which would match the IP returned by ifconfig for the matching NIC eg eth0

It would be useful if we knew exactly which distro+version you've got; try
Code:
cat /etc/issue
or try options here http://www.cyberciti.biz/faq/find-li...ersion-number/
 
Old 12-01-2015, 05:54 PM   #15
MrBojanglee
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
I am using Linuxlite 2.0 LTS

So what do I do?

Sorry It's Ubuntu 14.04.2 LTS

Last edited by MrBojanglee; 12-01-2015 at 05:57 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
messed up Ubunto, messed it up good... ButterflyMelissa Linux - Newbie 6 02-13-2015 08:28 AM
You must be a good system administrator before being a network administrator. mohajuice Linux - Certification 5 01-03-2013 12:46 PM
File and Directory attributes messed up after a RAID controller failure mubashirabbas Linux - Newbie 5 07-03-2012 07:24 PM
messed up : deleted /var/cache/debconf directory blackboab Linux - Software 3 02-29-2012 12:13 AM
I have messed up system directory ownerships Mike Gibson Linux - Newbie 13 02-23-2005 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:10 AM.

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