Problem :
I trying change owner of a directory. There was a mess before that about /etc/group file. There was a group named “500” and oinstall group id was 15001. I changed these configs manually via group file and I rebooted the system.
After that I check the directory for user and group and these like “oracle 500”. There is no group named “500” in /etc/group I used “chown” command for change the group 500 to oinstall but system gave an error like this:
[root@myserver /]# chown -R oracle:oinstall /dir
chown: invalid group: `oracle:oinstall'
note:
[root@myserver /]# getent passwd oracle
oracle:x:500:500::/home/oracle:/bin/cdax/bash
[root@myserver /]# getent group oinstall
[root@myserver /]# chown -R oracle:oinstall /dir
chown: invalid group: `oracle:oinstall'
[root@myserver /]# grpck -r
'rooty' is a member of the 'rooty' group in /etc/group but not in /etc/gshadow
no matching group file entry in /etc/group
delete line 'arda:!::'? No
no matching group file entry in /etc/group
delete line '500:!::'? No
grpck: no changes
oinstall /etc/group file:
[root@myserver /]# cat /etc/group | grep oinstall
oinstall:x:500:
I can see oinstall in group file but still chown/chgrp command doesn’t work correctly:
[root@ANIPTORCLT01 /]# chgrp oinstall /dir
chgrp: invalid group: `oinstall'
Solution :
I changed the nsswitch file passwd shadow and group lines to winbind from centrify and the problem is solved.