Change the default group of a user

Hi ,

for user test we have 3 groups.

  1. test
  2. dba
  3. qa

by default the group it test. How can I change the default group to dba?

Which OS?

usermod is typically available on most OS's, but without knowing your OS, we can't say which command you should use.

uname -a returning this result

Linux ***************** 2.6.18-238.12.1.el5 #1 SMP Sat
May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Hostname removed. Also usermod not working. And I don't have the root privilege.

If you don't have root privileges, then you'd better ask someone who has :slight_smile:

but the user is already into that group .. I just want one of change the default one.. still need the root access?

Thought it can be done without root access. Seems like need to raise ticket for the same to unix admin and have to wait for their SLA :frowning:

You might be able to use newgrp but that is only a temporary change.