LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-07-2012, 02:50 PM   #16
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30

catkin, I was very careful to set up exactly the same username and pw from the old on the new computer. Yes, I switch between GUI to (psuedo) terminal by logging out and using Alt+Ctrl+F1 to bring up a terminal view, then sudo restart to get back to the login to open Gnome.

I cannot locate either /passwd or /group in /etc? Am working on locating those directories.

I suspected that where I went wrong yesterday was to have zipped the /home directory instead of /home/myusername, so today I made a new tarball of /myusername (in /opt) on OLD,then:

went to the new computer and using the find command you gave me, located the "missing" /myusername2 file which wasn't missing at all. I was just looking at the wrong end of lines of the list. (good grief!) Anyway renamed /myusername and replaced it by renaming /myusername2 as /myusername, all this to restore the NEW computer to it's original state before yesterday's changes described earlier.

This "re-enabled" my ability to scp the tarball over to /myusername on NEW, then:
-renamed /myusername
-moved myusername.tar.gz into /home and unzipped it, then rebooted.

No cigar. Exactly the same 3 error messages as I listed last night.

Any ideas?

Last edited by Odyssey1942; 03-07-2012 at 04:15 PM.
 
Old 03-07-2012, 11:07 PM   #17
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
It's OK to log in at a virtual terminal while also logged in to the GUI desktop -- except when messing with files used by the desktop as suggested below!

/etc/passwd and /etc/group are files.

The error messages in post 14 do not look quite right. If possible, please copy and paste rather than type in (it's easier too).

I'm not running Gnome desktop so it is difficult to compare things on my system.

Working in a virtual terminal (when not logged in to the GUI desktop) ...

You could try mv ~/.ICEauthority ~/.ICEauthority.aside and then try logging into the GUI desktop.

How does the output of these commands (run either in a virtual terminal or in a GUI terminal emulator in the desktop) compare on old and new systems:
Code:
/bin/ls -ld ~ ~/Desktop ~/nautilus ~/.nautilus
(one of ~/nautilus ~/.nautilus will not exist)
 
Old 03-07-2012, 11:14 PM   #18
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
I am going to need to spend a bit of time with your latest to make sure that I understand it, but in the meantime, here is something that I just came up with:

On OLD computer in /home and using: ls -l, it reports:
drwx------ 2 root root 16384 date time lost+found
drwxr-xr-x 47 username username 4096 date time username

On NEW computer:
drwx------ 2 root root 16384 date time lost+found
drwxr-xr-x 47 root root 4096 date time home

I do not know, but would like to know, what is the significance of
username username in OLD vs
root root in NEW (i.e. I think the "root root" should be "username username" and do not know why the "root root" is there, but may have to do with the naming of the tarball?)

but certainly the "home" in the NEW must be problematic as this should be "username" as it was in OLD

I tried renaming home to username, but still have the same three error message upon login and so the "root root" must also be significant.

Does this help diagnose the problem?
 
Old 03-08-2012, 12:11 AM   #19
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
The old computer's directory layout is very unusual. The conventional layout is /home (owned by root:root) and a subdirectory for each user having the same name as the user's name, owned by the user and with the same group as the user's primary group (on some systems having the same name as the user name). The lost+found directory was explained by colucix in post 7.

The Internet is a wild and dangerous place on which it is prudent not to disclose personal information but items such as user names, group names and timestamps are not usually regarded as dangerous to reveal. Unless you have special reasons for not revealing them, it would be easier to help you if you could copy and paste them verbatim.

Each user's home directory is set in the /etc/passwd file in the 6th :-delimited field. Their primary group is denoted by a number in the 4th field. The corresponding name comes from the /etc/group file by looking up the line wiyh that number in the 3rd field and taking the name from the first.
 
Old 03-08-2012, 08:30 AM   #20
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Catkin, Your continuing assistance is very much appreciated. I hope to be able to resolve this today although I realize that differences in time zones may interfere. As I attempt to copy the console output as you suggest, I would like to better understand the issues you mentioned.

You said,
Quote:
The conventional layout is /home (owned by root:root) and a subdirectory for each user having the same name as the user's name, owned by the user and with the same group as the user's primary group (on some systems having the same name as the user name).
So do I understand that the setup on the NEW computer appears to be the conventional one? Also you wrote "/home" whereas the console on NEW shows just "home" and I wonder if the "/" is significant in terms of it working or not, or is that just you making sure to express that it is a directory not a file?

Also
Quote:
Each user's home directory is set in the /etc/passwd file in the 6th :-delimited field. Their primary group is denoted by a number in the 4th field. The corresponding name comes from the /etc/group file by looking up the line wiyh that number in the 3rd field and taking the name from the first.
What is the best way for me to examine each of those files without possibly inadvertently changing something?

Also if someone else wants to add their comments, you are most welcome to do so. Thanks.
 
Old 03-08-2012, 09:31 AM   #21
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
/home is used to show that it is a directory directly under the root of the file system (/).

When you wrote "I cannot locate either /passwd or /group in /etc" it was technically wrong -- you should have written "I cannot locate either passwd or group in /etc".

Can you give more detail on "the console on NEW shows just "home""? Which command are you running to make it show that?

One convention sometimes used to show that something is a directory and not a file is to put a trailing / on it. The convention is not widely enough used to be much use, though.

For a read-only view of files you can use cat /etc/passwd or, for a page at a time less /etc/passwd then space to page forward and q to quit.

Sometimes it's like this on LQ -- if a thread is progressing it ends up as a two-way conversation which in this case of widely separated time zones is not ideal.
 
Old 03-08-2012, 10:32 AM   #22
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Quote:
Each user's home directory is set in the /etc/passwd file in the 6th :-delimited field. Their primary group is denoted by a number in the 4th field. The corresponding name comes from the /etc/group file by looking up the line wiyh that number in the 3rd field and taking the name from the first
I have the contents of the passwd in view, but it appears that I need to ask you what "in the 6th :-delimited field. Their primary group is denoted by a number in the 4th field" means. I can't see anything that I can match up to that description. Thanks.

As soon as I get this sorted, I will copy the info regarding permissions and any lines in passwd and group that appear relevant and post it here (don't want to reproduce the entire contents from those two because of length, but can if helpful to you?)

Last edited by Odyssey1942; 03-08-2012 at 10:34 AM.
 
Old 03-08-2012, 11:31 AM   #23
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Here, I think, is what you have requested to see:

From OLD computer:

robert@Intel-i3-550:~$ ls -l /home
total 20
drwx------ 2 root root 16384 2010-11-20 12:37 lost+found
drwxr-xr-x 47 robert robert 4096 2012-03-07 17:43 robert
robert@Intel-i3-550:~$ ls -l /home/robert
total 84
-rw-r--r-- 1 robert robert 352 2011-07-29 05:48 AFRV-order 110726
-rw-r--r-- 1 robert robert 0 2011-02-04 18:58 Band Vista Q's
-rw-r--r-- 1 robert robert 1430 2011-07-26 13:41 Bookkeeper Responsibilities 110726.txt
drwxr-xr-x 24 robert robert 4096 2012-03-06 13:33 Desktop
drwxr-xr-x 2 robert robert 4096 2011-11-08 09:47 Documents
drwxr-xr-x 2 robert robert 20480 2012-03-07 16:53 Downloads
-rw-r--r-- 1 robert robert 2447 2011-06-19 12:37 DR Res email list
-rw-r--r-- 1 robert robert 179 2010-11-20 12:43 examples.desktop
drwxr-xr-x 2 robert robert 4096 2011-01-27 21:44 Music
-rw-r--r-- 1 robert robert 3113 2011-02-23 07:41 NotSxSW-13-16th
-rw-r--r-- 1 robert robert 4595 2011-02-23 07:46 NotSxSW-17-18th
-rw-r--r-- 1 robert robert 3113 2011-02-23 07:41 NotSxSW-Sunday 13
drwxr-xr-x 2 robert robert 4096 2010-11-20 21:19 Pictures
drwxr-xr-x 2 robert robert 4096 2010-11-20 21:19 Public
-rw-r--r-- 1 robert robert 819 2011-12-13 06:29 screen shot.txt
drwxr-xr-x 2 robert robert 4096 2010-11-20 21:19 Templates
drwxr-xr-x 2 robert robert 4096 2010-11-20 21:19 Videos


Because I can't do anything in NEW after I log in (this the problem I am trying to solve), I am restricted to the console (pseudo) or booting from a CD (which is maybe what I should do). Anyway the output from NEW is this (I have typed it but triple checked every character and am certain that it is 100% correct, including the dates and times):

robert@Intel-i3-550:~$ id
robert@robert-desktop:~$ ls -l /home
total 28
drwx------ 2 root root 16384 2010-11-20 12:39 lost+found
drwxr-xr-x 47 robert robert 4096 2012-03-07 12:38 robertorig
drwxr-xr-x 3 root root 4096 2012-03-07 12:45 robert
robert@robert-desktop:~$

(where "robertorig" is the original /home/user that I set up on NEW and later renamed when I wanted to unpack the tarball, which was unpacked into /home) (BTW, this is where I think I went wrong, just unsure how)

Also please note that there are none of the many files listed in NEW that show up in the "ls -l /home" output from OLD (at the top) and maybe another clue to what has gone wrong?

AND, I think I am making some progress figuring out the passwd and group thing, but let me know if I have failed to include anything you need to see. Here are selected line in the outputs from OLD:

robert@Intel-i3-550:~$ id
uid=1000(robert) gid=1000(robert) groups=1000(robert),4(adm),20(dialout),24(cdrom),46(plugdev),111(lpadmin),119(admin),122(sambashare)

robert@Intel-i3-550:~$ groups
robert adm dialout cdrom plugdev lpadmin admin sambashare

robert@Intel-i3-550:~$ grep robert /etc/passwd
robert:x:1000:1000:Robert,,,:/home/robert:/bin/bash

robert@Intel-i3-550:~$ grep robert /etc/group
adm:x:4:robert
dialout:x:20:robert
cdrom:x:24:robert
plugdev:x:46:robert
lpadmin:x:111:robert
admin:x:119:robert
robert:x:1000:
sambashare:x:122:robert
robert@Intel-i3-550:~$

cut from /etc/passwd

root:x:0:0:root:/root:/bin/bash
robert:x:1000:1000:Robert,,,:/home/robert:/bin/bash

and from group:

root:x:0:
adm:x:4:robert
dialout:x:20:robert
cdrom:x:24:robert
plugdev:x:46:robert
lpadmin:x:111:robert

These would seem to be the relevant lines but I am usure how to interpret them:

from passwd:
robert:x:1000:1000:Robert,,,:/home/robert:/bin/bash

from group:
adm:x:4:robert

Does this shed any light?

Last edited by Odyssey1942; 03-08-2012 at 01:38 PM.
 
Old 03-08-2012, 08:40 PM   #24
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Here's the problem:
Code:
robert@robert-desktop:~$ ls -l /home
total 28
drwx------  2 root   root   16384 2010-11-20 12:39 lost+found
drwxr-xr-x 47 robert robert  4096 2012-03-07 12:38 robertorig
drwxr-xr-x  3 root   root    4096 2012-03-07 12:45 robert
Hopefully fix by, as root
Code:
chown robert:robert /home/robert
 
Old 03-08-2012, 09:26 PM   #25
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
YES!!!!!! I'm so happy! Catkin, thank you most sincerely for hanging in there with me until this got resolved, and thank you for your insight. I have been beating my head against this wall of a problem for far longer than I like to admit.

The proposed solution worked. May I trouble you just a little more to please explain what you perceived the problem to be (i.e., "here's the problem"),

and what the corrective code actually did. I recognize chown as permission related but don't understand what was accomplished.

Thanks again, a hundred times.

Best regards,
robert
 
Old 03-09-2012, 08:02 AM   #26
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Great we got there in the end

Personal users need to be able to write to their home directories.

There's a good page about ownership and permissions here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Slackware 13.1 huge smp is not huge cs_strong Slackware 4 11-16-2010 07:41 AM
Huge amount of "PHP Notice:" -> huge logs Braynid Linux - Software 4 03-18-2008 06:35 AM
Huge Huge Problem With Forums!!! The_Insomniac Linux - General 1 06-07-2004 08:15 AM
After Tarball then what ? sevvy8 Linux - Newbie 2 03-29-2004 03:41 AM
Tarball? HardcoreGamer Linux - Software 4 02-12-2003 02:26 PM

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

All times are GMT -5. The time now is 12:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration