How to add "staff" group?

(Solved)I have a test id: testuser, when I create it pgrp=testgrp groups=testgrp, staff, I check it by lsuser testuser later, it shows pgrp=testgrp, groups=testgrp, no staff in groups, how to add staff in groups?

Verify it exist first, which I am sure it does but.

lsgroup staff

Then try this.

chuser groups=testgrp,staff testuser

You've left a space between the entries in the groups list it should be:

pgrp=testgrp groups=testgrp,staff

staff group exist, I use smitty user to add staff group, however, when I use lsuser to check, there is not staff. If I use #lsgroup staff, the user id is in the staff list.

What's wrong with it?

And if you look in /etc/group?

If there is a space before the username, for example, the user will show up with lsgroup.

$ grep scott /etc/group
...
staff:!:1:user1,user2, scott,user3
...

$ lsgroup staff
staff id=1 admin=false users=user1,user2, scott, user3

$ id scott
uid=12201(scott) gid=12201(scott) groups=users

Thank you, modify /etc/group then ok.

In AIX this is generally a bad idea: in this specific case it will work, in many other cases editing system files directly without using the special commands designed for that purpose will cause all sorts of subtle failures because the ODM and its representation (which the system files often are) starts to "drift apart" in their contents. The system commands ("chuser" or "chgroup" in this case) will take care of this and avoid any discrepancy between the systems ODM and the corresponding configuration files.

In fact ross.mather gave the most likely cause for the failure of your command: the list of groups must contain no spaces separating the group names.

I hope this helps.

bakunin