Koozali.org: home of the SME Server

Lazy Admin's Toolkit

Tom Haynes

Lazy Admin's Toolkit
« on: July 23, 2003, 01:47:45 AM »
Greetings...

I am trying to import user accounts for students at a school.

For management purposes, we would like for them to be in groups like class04, class05.

I have used the LAT to add users on a test machine, but I can't figure out how to assign them to a specific group when they are added.

I have the current version of the toolkit, and there is an option for GID. When I add a user and use the GID of a group from /etc/group, it just adds the user and does not assign the group.

I realize I could assign groups as another step, but if it could all be done at once, that would be a plus.

Thanks...   Tom

Tom Haynes

Re: Lazy Admin's Toolkit
« Reply #1 on: July 31, 2003, 04:36:49 AM »
For the benefit of anyone else who finds this thread, the instructions make it appear that group ID can be assigned when the account is created. In fact, you can only assign user ID from the lat-users script.

With the lat-groups, you can assign groups all day, and it is just another layer in the process.

Al Church

Re: Lazy Admin's Toolkit
« Reply #2 on: July 31, 2003, 07:42:35 PM »
You may want to look at this:
http://www.tech-geeks.org/contrib/loveless/batch_users/

It is for creating batch users. I think the groupnames are part of it. You _may_ have to create the groups in advance...not sure.

Once you get to where you want, you may wish to look at:
http://www.tech-geeks.org/article.php?story=20030303150037811

Michiel

Re: Lazy Admin's Toolkit
« Reply #3 on: August 12, 2003, 06:33:18 AM »
> For the benefit of anyone else who finds this thread, the
> instructions make it appear that group ID can be assigned
> when the account is created. In fact, you can only assign
> user ID from the lat-users script.

Probably I'm missing some subtle point here, but I don't see the problem:

lat-users -a -c="tom|Tom|Haynes|||||||||7001" will create user "tom" with uid/gid=7003 and

lat-groups -a -c="haynes|Tom's group|7004|tom" will create group "haynes" with uid/gid=7004 and add user tom to this group.

This is exactly the same behaviour you would expect from the server manager (or from useradd for that matter).

> With the lat-groups, you can assign groups all day, and it is
Actually, you can't :-). Mitel has effectively put a limit of 28 groups on the SME. However, the -n switch in lat-groups will allow you to circumvent this limitation (make sure you are using version 0.7.2).

Michiel

Abe Loveless

Re: Lazy Admin's Toolkit
« Reply #4 on: August 15, 2003, 08:46:38 PM »
True....

But, with the link that Al posted.. you can create your group before you add your users.  Then, add a whole batch of users to the system and make them a member of the specified group all in one step.

Every little bit helps, when you have large numbers of users to deal with.  :)