Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everyone, I cant seem to find a result on google (maybe im not using the correct search term) that fits what i want to do, so I thought I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    2

    Linking a samba PDC and a seperate file server.


    Hi everyone, I cant seem to find a result on google (maybe im not using the correct search term) that fits what i want to do, so I thought I see if anyone here knows the answer.

    So.... I have 2 servers.
    SERVER 1 -> SAMBA PDC running ClearOS
    SERVER 2 -> SAMBA NAS running Open Media Vault.

    what I would like to do is have the homes and profile shares on the PDC link to directorys on the nas, as I have a big drive in that machine.

    is this possible?
    if so how?

    many thanks in advance Chris.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hello and welcome!

    You can do that, it is not that involved.

    First share out the home dirs on the NAS via Samba - by default, I think that is already done. Take a look at the bottom of your smb.conf file (typically /etc/samba/smb.conf). Restart Samba on the NAS, if changes were made, and make sure that if a firewall is running on the NAS, that it allows Samba ports through.

    If SELinux is running, disable it for now, to keep it out of the way.

    Also make sure that you've used smbpasswd to create passwords for the user accounts on the NAS.

    Then from the PDC, test samba connectivity using an account on the NAS. You can use the smbclient utility do this, e.g.:
    Code:
    smbclient -U smbuser1 -L <NAS_IP_ADDRESS>
    obviously, substitute your proper account name for smbuser1 in my examples.

    if it works, you should see smbuser1's home dir listed under Sharename column in the smbclient output.

    then on the PDC, as root, mount the share, e.g.:
    Code:
    # first create the mount point
    install -o smbuser1 -g smbgroup -m 0700 -v -d /net/smbuser1
    
    # then run the mount command
    mount -o user=smbuser1,uid=$UID,gid=$GID -t cifs //<NAS_IP_ADDR>/smbuser1 /net/smbuser1
    this assumes that the user smbuser1 and smbgroup exist on the PDC (the same user accounts and group account - with the same UID/GUI - should match on both PDC and NAS). Also, for $UID and $GID, substitute the appropriate values taken from /etc/passwd and /etc/group on the PDC (or NAS, they should be the same).

    If that works, then you can look into automating the mount, but keep in mind that this would require the users' samba passwords to be kept in plain text somewhere.

    Look into autofs for auto-mounting the shares.

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    2
    atreyu... thanks ever so much for that I will give it a go this week when I get time and let you know how I got on

  4. $spacer_open
    $spacer_close

Posting Permissions

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