Koozali.org: home of the SME Server

Primary group

Offline bluenix

  • 2
  • +0/-0
Primary group
« on: February 12, 2009, 03:51:29 PM »
Hi,

I'm very impressed with SME Server. I've built a couple of different PDC servers myself, but I've always been frustrated to not have an "out of the box" solution. Thank you for making SME Server so easy to set up!

Of course there's still a few adjustments that I would like to make. One thing that makes it very difficult to use a lot of scripts I already have, is that users get created with their primary groups the same as their usernames. Is there a way to change this behaviour, and maybe add an option to the webinterface to select the primary group for the user?

It would be even better if, on top of that, users home directories would be created per group. e.g.: Homedirectory for user "user1" in group "group1" would have a home directory like /home/group1/user1

As far as I can see, the code is written very readable and easily adjustable, but I just don't know enough yet of SME Server to know which files to change!

Your advise is greatly appreciated!
« Last Edit: February 12, 2009, 03:58:37 PM by bluenix »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Primary group
« Reply #1 on: February 12, 2009, 04:02:17 PM »
hi and... welcome!

the only place to ask/discuss such a theme is bugzilla (link is above)

as you are able to code/script (as far as I understand from your words), please open a NFR and propose your code.

remember to read carefully (almost TWICE) the documentation and to search here and in the wiki before posting ;-)

Ciao
Stefano

Offline gzartman

  • *
  • 306
  • +0/-0
    • LEI Engineering & Surveying
Re: Primary group
« Reply #2 on: February 12, 2009, 06:18:54 PM »
Of course there's still a few adjustments that I would like to make. One thing that makes it very difficult to use a lot of scripts I already have, is that users get created with their primary groups the same as their usernames. Is there a way to change this behaviour, and maybe add an option to the webinterface to select the primary group for the user?

SME Server is designed to be administered from the Server-Manager (web interface), not the command line.  Given that you are new to SME Server and obviously have some experience with another *nix, I would warn you to proceed with caution.  There is a quite elaborate infrastructure in place that controls the configuration/administration of SME Server, the UI being the Server Manager.  If you try to do some of the things you would do on a typical Linux install at the commandline, you could quite easily break SME Server.

Become familiar with the Server-Manager, then read the manuals before you start running custom scripts.

It would be even better if, on top of that, users home directories would be created per group. e.g.: Homedirectory for user "user1" in group "group1" would have a home directory like /home/group1/user1

This is typically not the way most Linux distros store user home directories, as groups can come and go over time.
« Last Edit: February 12, 2009, 06:21:12 PM by gzartman »
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline bluenix

  • 2
  • +0/-0
Re: Primary group
« Reply #3 on: February 13, 2009, 10:47:17 AM »
Thank you both for your fast replies!

As I hear you about SME Server, it sounds like finally somebody understands that a Linux server too should (and can) be made easy to manage. I like that. If I can go from scripting to just using everything, I'd be more than happy!

Maybe if I tell you what I'd like to accomplish, you could maybe tell me how this could be achieved from within SME Server-Manager?

My situation is based on a school. There's 3 things I'd like to accomplish:

1) Teachers to have complete access to Students files, but not to files of other Teachers.
2) Shared samba drives on a per-group base. e.g.: All Teachers would share a "Teacher Drive".
3) Mandatory profiles per group.

I used to accomplish 1) by making the Teachers group "admin users" of the home-directories of the students (these were like "/home/Students/student1")
I used to accomplish 2) by creating a samba share for a group, and then map this "drive" with the logon script for that group
I used to accomplish 3) by having "logon path = \\%N\profiles\%G.man" in smb.conf. (this only looks at the primary group the user is a member of...)

Thank you very much for your help!


(btw: I love the auto-raid and radius implementations!)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Primary group
« Reply #4 on: February 13, 2009, 11:19:29 AM »
1) Teachers to have complete access to Students files, but not to files of other Teachers.

ok.. read here

Quote
2) Shared samba drives on a per-group base. e.g.: All Teachers would share a "Teacher Drive".

create a group for all the teachers and an ibay for that group.. read the manual

Quote
3) Mandatory profiles per group.
I used to accomplish 3) by having "logon path = \\%N\profiles\%G.man" in smb.conf. (this only looks at the primary group the user is a member of...)

this could be done with a custom template.. you should test.. more info in the dev manual

Ciao
Stefano