shell script

General support questions
Post Reply
hardquest
Posts: 4
Joined: 2018/06/21 10:26:59

shell script

Post by hardquest » 2018/06/21 10:34:11

Hi All,

Hopefully you can help me with installing service. It says that I need to create user chriscs and add it to chrisgrp

So I've create user - useradd chriscs then chrisgrp - groupadd chrisgrp. After that i've added that user to a group by - usermod -G chrisgrp chriscs

and i can see by doing cat /etc/group that chrisgrp:x:6000:chriscs, so as i understand that user is in the group i want? But when i run script it says "User chriscs is not a member of group chrisgrp" Recommended action - Ensure the user specified is a memeber of the group to be used???


Thanks, if someone can help me.

Regards,

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: shell script

Post by lightman47 » 2018/06/21 12:13:14

Did you logout/login or reboot after the modifications?

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: shell script

Post by tunk » 2018/06/21 12:24:48

And if that doesn't work, you could try:
usermod -g chrisgrp chriscs
And then logout/login.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: shell script

Post by TrevorH » 2018/06/21 12:29:29

Also usermod -G chrisgrp chriscs will have removed that user from all other groups. You need to use usermod -a -G group user to add a new group to the existing list.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hardquest
Posts: 4
Joined: 2018/06/21 10:26:59

Re: shell script

Post by hardquest » 2018/06/21 14:24:07

Tried everything and it's still the same, when i do cat /etc/group i can see that chriscs is assigned to chrisgrp :/

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: shell script

Post by tunk » 2018/06/21 14:38:59

How does /etc/passwd look like? The primary/login group is stored there.
In your case I guess that the fourth item/field should be 6000 (=GID for chrisgrp).

hardquest
Posts: 4
Joined: 2018/06/21 10:26:59

Re: shell script

Post by hardquest » 2018/06/21 14:50:43

cat /etc/passwd
returns this

chriscs:x1001:6000::/home/chriscs:/bin/bash

So as i can understand it should be fine?

p.s as well i've tried doing

id chriscs

and result is

uid=1001(chriscs) gid=6000(chrisgrp) groups=6000(chrisgrp)

so i don't know what else i can do...

Thanks

hardquest
Posts: 4
Joined: 2018/06/21 10:26:59

Re: shell script

Post by hardquest » 2018/06/28 10:29:30

still can't figure it out. now i've tried to install as a root and group root as well, and with the same message that it's not in the group..

Thanks

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: shell script

Post by pjsr2 » 2018/06/28 13:40:31

You don't give any details on the script you are trying to run.

Are you sure that script you are using is testing if the user belongs to the group "chrisgrp". What determines which group this script expects the user to belong to?

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: shell script

Post by tunk » 2018/06/28 15:33:05

I guess you could look at the script and try to debug it.
You could also contact the people who made it and ask if they've seen this problem before.

Post Reply