LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   D-BUS useradd error??? (https://www.linuxquestions.org/questions/linux-from-scratch-13/d-bus-useradd-error-885939/)

spiky0011 06-12-2011 03:11 PM

D-BUS useradd error???
 
I,m having a problem with D-BUS-1.2.24
Code:

groupadd -fg 18 messagebus &&
useradd -c "D-BUS Message Daemon User" -d /dev/null \
        -u 18 -g messagebus -s /bin/false messagebus || [ $? == 9 ]

the output I get is
Code:

useradd: group '1000' does not exist
useradd: the GROUP= configuration in /etc/default/useradd will be ignored

In the groups file I have messagebus:x:18
/etc/defaults/useradd
Code:

# useradd defaults file
GROUP=1000
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes

Any ideas plz

spiky0011 06-12-2011 03:26 PM

I checked /etc/passwd file there is a user listed
Code:

messagebus:!:18:18:D-BUS Message Daemon User:/dev/null:/bin/false
So why the error???

TobiSGD 06-12-2011 03:58 PM

Do you have a group with GUID 1000? All useradd is complaining about is that there doesn't seem to be such a group although you have specified it as default group in your configuration file.

spiky0011 06-12-2011 04:12 PM

No there is no group 1000. So 2 options, 1 remove the new group and user then create group 1000 or 2 leave as it is?
If I create group 1000 what to name it? If I leave it as it is I assume this will not affect the build

crts 06-12-2011 05:01 PM

Hi,

alternatively you could issue the following command:
Code:

sed -i.bak '/GROUP/ s/^/#/' /etc/default/useradd
It will comment out the default user-group and get rid of the warning.
It will also make a backup of the original file with extension *.bak.

TobiSGD 06-12-2011 05:05 PM

This is only a warning and will not affect your built.

spiky0011 06-13-2011 01:16 PM

Ok I have checked the lfs book and it dosn't mention a group 1000, But it seems it would be a good idea to include it? As further packages relliy on it, But ok for future reference when creating the groups file, in lfs adding the group 1000 then would solve the prob, What should the group be named? or is group:x:1000 ok.

druuna 06-13-2011 01:25 PM

Hi,
Quote:

Originally Posted by spiky0011 (Post 4383573)
Code:

groupadd -fg 18 messagebus &&
useradd -c "D-BUS Message Daemon User" -d /dev/null \
        -u 18 -g messagebus -s /bin/false messagebus || [ $? == 9 ]


These 2 commands should create a group called messagebus with gid 18 and a user called messagebus with uid 18

I don't know why you see the error, but check if the group and user are present and have the correct id's. If so, you are done in regards to adding this specific user and group.

Do keep an eye out on this "group '1000' does not exist" error (you are probably going to create other users and group in due time).

Hope this helps.

spiky0011 06-13-2011 01:40 PM

I seem to remember it popping up when building ssh. On my 2nd build system I have put the user as group 1000 IS this a mistake!!! I dont think the error popped up when I installed ssh on that system

druuna 06-13-2011 02:04 PM

Hi,
Quote:

Originally Posted by spiky0011 (Post 4384415)
I seem to remember it popping up when building ssh. On my 2nd build system I have put the user as group 1000 IS this a mistake!!! I dont think the error popped up when I installed ssh on that system

I don't think that is is technically wrong but ssh, being a system user, is normally found in the lower regions of the uid count (Debian uses 107, BLFS uses 50 I use 108).

If this error showed up before you created the ssh user then ssh's uid of 1000 cannot be the cause. If this error showed up afterwards (or you do want to normalize the uid): You might try to change ssh's uid
Code:

usermod -u 50 sshd
and check afterwards if there are any leftover files with a uid of 1000 and change these as well
Code:

find / -uid 1000 -print
Hope this helps.

spiky0011 06-13-2011 03:08 PM

I have sshd as 50 0n my 1st system thats the 1 that pulled the error when installing ssh, and I have user as 1002 that was self generated when I added "me" as a user That is on my 1st build system.
The output of the find is home/martyn/ and all lower dirs. And /tools and /var/mail/help

I,m not to worried about it things work ok. just thought I would find correct way for group file,

TobiSGD 06-14-2011 06:30 AM

As stated before, this is not an error, but a simple warning that the given default group doesn't exist. Nothing to worry about.

druuna 06-14-2011 06:52 AM

To add to TobiSGD's reply:

If you want to get rid of this warning you can:

1) create a group called users with gid 1000 groupadd -g 1000 users (users is commonly used as the default group).
2) if you already have a group called users, change the GROUP entry in /etc/default/useradd to reflect its gid.

Hope this helps.


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