Forums

EVA-NB
EVA-NB
Offline
Resolved
0 votes
Hi all,

I have an environment here with two sites. On both sides there is planned to run a ClearOS server. B)

Some users roam between these two sites so I want them to be able to log in at both sites and have their working environment the same.

So far I'm using Account Synchronisation (ClearOS Pro) which appears to work pretty fine so far. I can log in on both servers.

But I have no clue how to solve the issue with the home directories. :unsure:

Each user gets but default its Samba home directory as /home/%U (i.e. /home/jdoe) with the username. Wokrs fine in a single server setup.

I was thinking of using the %G Variable in smb.conf to get an additional subdirectory like this:
/home/%G/U --> /home/site1/jdoe or /home/site2/esmith where the /home/site1 and /home/site2 folders would be an NFS mount from the other site and jdoe would be a member of the group "site2" while esmith would be a member of "site2"

In theory this should work pretty fine. :blush:
In pratice Samba in ClearOS always replaces the "%G" with "allusers" as this appears to be the primary group for all users. :blink: The group "allusers" cannot be edited in ClearOS :dry:

Is there any way how to archive my goal? How can I flag users so I can have different home directories for them?

Thanks in advance!

Christian
Thursday, July 24 2014, 09:51 AM
Share this post:
Responses (7)
  • Accepted Answer

    Saturday, November 07 2020, 11:23 PM - #Permalink
    Resolved
    0 votes
    Perfect :-)
    Thanks.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 09:43 PM - #Permalink
    Resolved
    0 votes
    Mine ("include /etc/samba/smb.nick.conf") has remained untouched throughout 6.x and 7.x.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 08:21 PM - #Permalink
    Resolved
    0 votes
    Yeah, I was thinking something like that. Probably an include file as smb.conf might get touched by ClearOS as well. Can I be sure the include line will survive?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 07:53 PM - #Permalink
    Resolved
    0 votes
    I think 6 years would be classed as a necro-bump!

    What you can do is set up the share as far as you want then move it from /etc/samba/flexshare.conf to your own file like /etc/samba/something.conf. Then, in /etc/samba/smb.conf, add an extra line "include /etc/samba/something.conf" to /etc/samba/smb.conf, probably just after the line "include /etc/smb/flexshare.conf". Or you could move the share to /etc/samba/smb.conf. Then you have to delete the flexshare from the webconfig. It will no longer show there, but will work and you will be able to change it to your heart's content.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 05:51 PM - #Permalink
    Resolved
    0 votes
    Hello Nick,

    6 years is nothing. So is there a place I can hide my smb.conf changes where ClearOS won't mess them up?

    Cheers.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 05:10 PM - #Permalink
    Resolved
    0 votes
    Replying to a 6 year old post!

    Also the original post was about manipulating the home dir. This has a chance of working as the definition of a home dir does not get updated at all. If you do this sort of change to flexshares, every time you make a change to any flexshare in the webconfig, your change will get overwritten.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 04:57 PM - #Permalink
    Resolved
    0 votes
    You can force the group in SAMBA for the share with;
    force group = eg_staff


    Then create a new folder from Windows in your staff share then check in the server
    ls -ls /var/flexshare/shares/staff

    to see that new folders are not allusers but eg_staff

    However for my purpose this is not quite what I want. It also means any user who has access is also eg_staff for reading purposes.
    The reply is currently minimized Show
Your Reply