Group ID mixed up with another User ID

Get answers here.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Group ID mixed up with another User ID

Post by Arf » Sat Jan 12, 2008 4:14 pm

Does anyone know how to fix this?

I have a user whose GROUP ID # is the same as another users USER ID #. I know they're not supposed to be the same. So I have two questions:

1) How to I re-assign these numbers?
2) How do I find a "unique" number to assign?

My guess on #2 is just to pick a unique sequential number in the /etc/ group, shadow, passwd, etc files.

I've submitted a ticket but of course it's Saturday and nobody is working at the mother ship.

m2
Hard Drive Crasher
Posts: 767
Joined: Sun Nov 21, 2004 2:19 pm
Location: Lexington, KY

Post by m2 » Sat Jan 12, 2008 8:13 pm

Will groupmod do what you want?

man groupmod
GROUPMOD(8) GROUPMOD(8)

NAME
groupmod - Modify a group

SYNOPSIS
groupmod [-g gid [-o]] [-n group_name ] group

DESCRIPTION
The groupmod command modifies the system account files to reflect the changes that are specified on the command line. The
options which apply to the groupmod command are

-g gid The numerical value of the group’s ID. This value must be unique, unless the -o option is used. The value must be
non-negative. Values between 0 and 99 are typically reserved for system groups. Any files which the old group ID
is the file group ID must have the file group ID changed manually.

-n group_name
The name of the group will be changed from group to group_name.

FILES
/etc/group - group information
/etc/gshadow - secure group information

SEE ALSO
chfn(1), chsh(1), passwd(1), groupadd(8), groupdel(8), useradd(8), userdel(8), usermod(8)

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Sun Jan 13, 2008 1:49 am

OK maybe, but I don't know what number to modify it to?

m2
Hard Drive Crasher
Posts: 767
Joined: Sun Nov 21, 2004 2:19 pm
Location: Lexington, KY

Post by m2 » Sun Jan 13, 2008 1:55 am

I think you can cat /etc/group and pick an GID number over 100. I would get the last GID (over 100) that's listed and increment by 10. (The records aren't incremental, grep for the GID you plan to use to make sure it's available.)

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Sun Jan 13, 2008 4:30 am

Arf,
FWIW, I see several where one user's id is the same number as another's group id. Is it causing some problem for you?

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Sun Jan 13, 2008 4:00 pm

Sapphyre wrote:Arf,
FWIW, I see several where one user's id is the same number as another's group id. Is it causing some problem for you?

Yes. It causes trouble when it comes to the user's or group's disk quota.

Navisite (amazingly fast as in, within 24 hrs likely because it was a system admin. issue and not a DSM/Proprietary issue) got in there and fixed the problem.

They tried a lot of things and finally got it working.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest