You can create an user with -g primary group and -G secondary group option to tie to few groups and you can do useradd -D -e 30 to expire it after 30 days.
# useradd -u uid -g primary-group -G sec-group1,sec-group2 -d home-dir user1
# useradd -D -e 30 --> to expire it after 30 days
or u can use
# usermod -e 30 to expire it after 30 days
Thanks,
Vasanth.