Results 1 to 5 of 5

Thread: User's home directory saved in Samba server not locally

  1. #1
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    103

    Default User's home directory saved in Samba server not locally

    Hi guys,

    Continuing with my assigned task of migrating the company's PCs to GNU/Linux (openSUSE as server for GNU/Linux clients) I managed to set up a DC with roaming profiles for the few remaining Windows users, user validation and login for the openSUSE boxes and a few network shares with different rights.

    I know there are no roaming profiles for GNU/Linux and I can live with that but I would like to specify wich users/groups would have their home directories saved locally (notebook users) and which will save them on the Samba server.

    By default home directories are saved locally but somehow Samba creates a minimal home directory for each user under /home in the Samba server. How can I tell the client box to use that directory? and how can I set up the few notebook users to save it on their disks?

    Maybe using the options under Yast > Security... > Users and groups management > Users (LDAP Users filter) > and then select the user and use the "Manage Samba account parameters" plug-in for specifying the different paths cant achieve this.

    Thank you in advance,

    Pancho
    openSUSE | Think correctly

  2. #2
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    103

    Default Re: User's home directory saved in Samba server not locally

    I could find the solution to the location of the home directories. It seems Samba won't care for the location of the home directories since there are other solutions to implement that like NFS.
    So I manage to mount a share from the Samba server (/domainHomes) over the client home directory so Samba will create the the user's home where it's needed.

    But somehow some problems appeared: the NFS share must be manually configured on the client PC. During the first login Samba tries to create the home directory but it fails due to rights problems.
    I've made a script based on one I'd found googling which will create the home with the correct rights but Samba won't execute it when specified under [homes] as root preexec.

    So, if possible, I would like to know where is the script for the home directory creation (or the way to override it) and if it's possible to mount the NFS share during log in.

    I will post any information I find. Thanks In advance,

    Pancho
    openSUSE | Think correctly

  3. #3
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: User's home directory saved in Samba server not locally

    On Tue March 29 2011 06:06 pm, Panchux wrote:

    >
    > I could find the solution to the location of the home directories. It
    > seems Samba won't care for the location of the home directories since
    > there are other solutions to implement that like NFS.
    > So I manage to mount a share from the Samba server (/domainHomes) over
    > the client home directory so Samba will create the the user's home where
    > it's needed.
    >
    > But somehow some problems appeared: the NFS share must be manually
    > configured on the client PC. During the first login Samba tries to
    > create the home directory but it fails due to rights problems.
    > I've made a script based on one I'd found googling which will create
    > the home with the correct rights but Samba won't execute it when
    > specified under [homes] as root preexec.
    >
    > So, if possible, I would like to know where is the script for the home
    > directory creation (or the way to override it) and if it's possible to
    > mount the NFS share during log in.
    >
    > I will post any information I find. Thanks In advance,
    >
    > Pancho
    >
    >

    Pamcho;
    Did you try your script in the [netlogon]share? At least for Windows
    clients this is the location for logon scripts. There is a very short
    writeup on this share here:

    http://www.samba.org/samba/docs/man/...html#id2562461

    I've never tried this for linux clients.

    Have you tried the Samba mailing list. I think you will find a lot more
    individuals with knowledge of what you are trying to do.

    http://www.samba.org/samba/archives.html
    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  4. #4
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    103

    Default Re: User's home directory saved in Samba server not locally

    venzkep, thank you for your time and effort.

    It seems the implementation of Samba and/or LDAP in openSUSE/SUSE is different from other distros'. What applies to other distros do not apply to openSUSE.
    As far as I know the main difference between a logon script and a preexec script is that the preexec executes before the login proccess starts and the netlogon script executes after the user has logged in, so it can't be use for creating the home directories.

    The script goes like this (maybe is usefull for someone)

    #!/bin/bash

    if [ ! -d /domainHomes/$1/$2 ]; then
    mkdir -p /domainHomes/$1/$2
    chmod g+s /domainHomes/$1/$2
    chown $2:ntadmins /domainHomes/$1/$2
    chmod 770 /domainHomes/$1/$2
    /usr/bin/setfacl -m g:ntadmins:rwx /domainHomes/$1/$2
    /usr/bin/setfacl -m u:"$2":rwx /domainHomes/$1/$2
    /usr/bin/setfacl -m g:ntusers:000 /domainHomes/$1/$2
    fi
    exit 0
    I will try the Samba mailing list,

    Pancho
    openSUSE | Think correctly

  5. #5
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: User's home directory saved in Samba server not locally

    On Tue March 29 2011 10:36 pm, Panchux wrote:

    >
    > venzkep, thank you for your time and effort.
    >
    > It seems the implementation of Samba and/or LDAP in openSUSE/SUSE is
    > different from other distros'. What applies to other distros do not
    > apply to openSUSE.
    > As far as I know the main difference between a logon script and a
    > preexec script is that the preexec executes before the login proccess
    > starts and the netlogon script executes after the user has logged in, so
    > it can't be use for creating the home directories.
    >

    <snip>
    >
    > I will try the Samba mailing list,
    >
    > Pancho
    >
    >

    Pancho;

    My experience is limited strictly to Windows clients, so my ignorance of your
    problem is only exceeded by my audacity in trying to reply. I'm glad to
    hear you will try the Samba mailing list the developers do monitor that list.
    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

Tags for this Thread

Posting Permissions

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