+ Post New Thread
Results 1 to 8 of 8
*nix Thread, Stop samba making home directories for machine accounts in Technical; Hi Nearly there I feel I have samba and windbind etc running great and creating home directories automatically for new ...
  1. #1
    philjones2000's Avatar
    Join Date
    Mar 2006
    Location
    Pool, Cornwall
    Posts
    137
    Thank Post
    52
    Thanked 8 Times in 4 Posts
    Rep Power
    21

    Stop samba making home directories for machine accounts

    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

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Stop samba making home directories for machine accounts

    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.

  3. #3
    philjones2000's Avatar
    Join Date
    Mar 2006
    Location
    Pool, Cornwall
    Posts
    137
    Thank Post
    52
    Thanked 8 Times in 4 Posts
    Rep Power
    21

    Re: Stop samba making home directories for machine accounts

    I couldn't get samba's homedir to work with group info.

    I tried %G but it didn't like it. Do I need to map the ad groups to new unix groups? How? :?

    Thanks

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Stop samba making home directories for machine accounts

    Does
    Code:
    getent group
    return your Windows groups?
    Have you set your users default group correctly in AD?

  5. #5
    philjones2000's Avatar
    Join Date
    Mar 2006
    Location
    Pool, Cornwall
    Posts
    137
    Thank Post
    52
    Thanked 8 Times in 4 Posts
    Rep Power
    21

    Re: Stop samba making home directories for machine accounts

    Quote Originally Posted by Geoff
    Does
    Code:
    getent group
    return your Windows groups?
    Yes
    Quote Originally Posted by Geoff
    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.

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Stop samba making home directories for machine accounts

    Quote Originally Posted by philjones2000
    Quote Originally Posted by Geoff
    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.

  7. #7
    philjones2000's Avatar
    Join Date
    Mar 2006
    Location
    Pool, Cornwall
    Posts
    137
    Thank Post
    52
    Thanked 8 Times in 4 Posts
    Rep Power
    21

    Re: Stop samba making home directories for machine accounts

    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

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Stop samba making home directories for machine accounts

    Might need to be %g rather than %G to get sensible group names (rather than gid).

SHARE:
+ Post New Thread

Similar Threads

  1. SharePoint Server 2003 Home Directories
    By plock in forum Virtual Learning Platforms
    Replies: 0
    Last Post: 10th December 2007, 09:32 AM
  2. Home Directories on Moodle
    By apeo in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 13th June 2007, 11:20 AM
  3. Replies: 2
    Last Post: 27th April 2007, 06:41 AM
  4. Replies: 27
    Last Post: 25th January 2007, 03:42 PM
  5. Stop kids locking each others accounts
    By ken_kaniff in forum How do you do....it?
    Replies: 24
    Last Post: 18th May 2006, 02:21 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •