Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Stop samba making home directories for machine accounts


Recommended Posts

Posted

Hi

 

Nearly there I feel :)

 

I have samba and windbind etc running great and creating home directories automatically for new users. Problem is its making directories for machines as well. This will get messy very soon methinks!

 

How do I get it to stop making home directories for machine accounts? I added the line:

 

session required /lib/security/$ISA/pam_mkhomedir.so skel=/etc/skel umask=0077

 

to system-auth- is there anything I dd to filter out machine accounts?

 

Thanks

 

Phil

Posted

Couple of Solutions.

 

1) don't use pam_mkhomedir. Create the directories manually.

2) alter your samba homedir path to include group information and nuke the contents of /home/Domain Computers in a cronjob. Or just ignore the folder.

Posted
Does
getent group

return your Windows groups?

Yes

Have you set your users default group correctly in AD?

 

Is this "Primary Group" in the "member of" tab in groups and users?

 

If so, no.

Posted

Have you set your users default group correctly in AD?

 

Is this "Primary Group" in the "member of" tab in groups and users?

 

If so, no.

 

Ok, you need to fix that. Then your %G substitution will work as expected.

Posted

Nice.

 

Sorted the Primary group and now samba puts them in groups (using the numerical id but hey, I can live with that).

 

That is much tidier. (not my forte!)

 

Big thanks Geoff

 

Phil

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...