Assign new users to two groups?
Is it possible in Linux to assign a new user who log in for the first time to two different groups?
The situation is: Im a computer trainee at the geological institution in Lund Sweden, I have set up ubuntu as a Macintosh Time Machine backup server. The server is set up to accept both local users and LDAP users, and when I log in from the Mac with a user in LDAP but who's not in the local users list, ubuntu creates a new home directory at /home/<username>, with the help of PAM mk_homedir.
The problem is : I have made a separate folder /Backup, where I mount the Time Machine disk. I have created a new group called tmusers, and I want only the members of this group to be able to access and write to the /Backup folder
My supervisor wants the process of creating a user to be as transparent as possible (i.e. it saves him time to do other things). The best situation would be not needing to do anything on the server at all.
So I need the users to be member of their own group AND "tmusers" . Furthermore the adding of a specific user to "tmusers" should be done only the first time a user logs in, wether its a local user or a LDAP user.
Does anyone know how to solve whole/parts of this problem? Any help greatly appreciated.