LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What would cause this output (https://www.linuxquestions.org/questions/linux-software-2/what-would-cause-this-output-146093/)

shanenin 02-14-2004 03:31 PM

What would cause this output
 
what would cause this output. If it matters I am tryingto configure my LFS system.
Code:

[root@marsala /etc]# su - shane
id: cannot find name for group ID 100
[shane@marsala ~]$


AMMullan 02-14-2004 03:43 PM

Ummm from what I can see it appears that a group that "shane" belongs to has been deleted...

shanenin 02-14-2004 05:56 PM

I think I need a basic understanding of how users and groups are set up.

AMMullan 02-14-2004 06:21 PM

K i'm not an expert but this is what I know:

First of all, root ALWAYS has a UID of 0.

When u add a user they get a UID (User ID) i.e. 500
You are also part of a group - as a default its your username. (GID might be also be 500)
That information is all stored in /etc/passwd along with your home directory and encrypted password.
When you logon or a program needs to authenticate you it checks /etc/passwd for an entry and when you enter a password it is encrypted and compared to that of the /etc/passwd entry.

Thats basically it, file permissions are basic, they are based on username and pasword but alsoo permission bits (i.e. you might do an ls -l foo and get get the following)

Code:

[ammullan@daemon ~]$ ls -l | grep foo
-rwxrwxr-x    1 ammullan ammullan    11954 Feb 14 20:59 foo

The -rwxrwxr-x is read, write and execute permissions. They are broken down into 3 block groups (i.e. in this example foo can be read, written to and executed by user and group and can be read and executed by all)... The 1st bit will have a d if it's a directory etc.

Hope that helps a bit :D (If ya wanna know any more let me know)

shanenin 02-14-2004 06:31 PM

thanks for all of your help, this gives me somthing to work from.

AMMullan 02-14-2004 06:57 PM

No problems :) Also, if you use id it'll show u what your UID and GID is (you can also do id root to find out root's etc)

shanenin 02-14-2004 06:57 PM

I kind of tracked the problem down to /etc/bashrc . If I change the name of that file I no longer get that output anymore.

AMMullan 02-14-2004 07:01 PM

Ummmm you knmow thats where all your system aliases and bash info is stored aye?

shanenin 02-14-2004 07:03 PM

I am not leaving it that way(/etc/bashrc2), I just thought it was interesting that that made a difference.

AMMullan 02-14-2004 07:09 PM

K just looking at the file - check this line:

Code:

if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
        umask 002
else
        umask 022
fi

This is checking your UID, GID and makes sure that your UID is greater than 99 - try this:

usermod -U shane -g shane

If you get an error try:

groupadd shane
usermod -U shane -g shane

AMMullan 02-14-2004 07:12 PM

Actually just tried that (thought it would work) but it doesn't... did you try teh id shane?

shanenin 02-14-2004 07:39 PM

I added this line to /etc/group(advice from a different forum)

shane:x:100:

that fixed it. That leads me to another question: how come my gentoo system works fine without that line in /etc/group

shanenin 02-14-2004 07:53 PM

thanks for all of your help:)

AMMullan 02-14-2004 08:22 PM

Quote:

That leads me to another question: how come my gentoo system works fine without that line in /etc/group
Not sure, but without a group the user is a nobody (less than that even as there's a nobody group lol)

Basically, your GID says what permissions you have as a user, without that i'd be surprised if you can do much :)


All times are GMT -5. The time now is 03:36 PM.