• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 838
  • Last Modified:

Samba Winbind create home directories change "domain users" group

I am using winbind and samba to authenticate linux logins to windows.  I am able to auto-create user home directories.  I want to change the group on the home directories to something other than "Domain Users"
0
rsissick
Asked:
rsissick
  • 2
  • 2
1 Solution
 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
Assuming you have left everything default, you'll need to force a chance in your new-user script.

The DEFAULT (I believe) is to run the script that comes with Samba
(something like /usr/local/samba/bin/add_user (which comes with the distro)....

I don't know if that script takes any variables, but you could make it use the default unix useradd in a manner such as this:
        add user script = /use/sbin/useradd -g OTHERGID -m -b <path to homes> -s /sbin/nologin %u

NOTE: This script may NOT be exactly the same as the default one! What it WILL do though is:
 - create a user home folder at <path to homes>/username
 - make the user by default belong to the group OTHERGID (instead of Domain Users)
 - NOT allow the new user to login to the Linux box (no shell account -- samba is still fine!)

I am not POSITIVE that this will make the new home folder belong to the group OTHERGID... but I think it will!

Good Luck


Dan
0
 
rsissickAuthor Commented:
hi,
That sounds could, but I cant find /usr/local/samba/bin/ I dont have any such directory.
0
 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
The location of your samba binaries depends on how you installed it. The path I gave would assume you BUILT your samba from source. It appears that you installed from a package (or RPM), in which case the executables would be elsewhere (probably /usr/sbin).

To find the executable for smbd, run:
  find / -type f -name smbd -print

To find the add_user script (possibly executable program -- not sure with the latest samba!), run:
  find / -type f -name add_user -print

Good Luck!

Dan
IT4SOHO
0
 
rsissickAuthor Commented:
Thnks ill gv that a shot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now