AIX : Removing an unnamed group

Had a user recently create a group in AIX but inadvertently pressed a strange key combination that resulted in adding a new group without a displayable group name. He was unable to remove the group with rmgroup as there did not appear to be a name for the group he’d added although there was a GID for it.

Indeed, even smitty group -> List All Groups did not show the group.

In /etc/group I could see the GID of the invalid group and in /etc/security/group I could also see a group name for it followed by a ^M, this must have been the offending key combination that had screwed up /etc/group.

Running

rmgroup "group^M"

did the trick, where group was the group name shown in /etc/security/group and ^M was created using the key combination CTRL-v CTRL-m.

About

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: