Results 1 to 5 of 5

Thread: How to put samba in your environment Path

  1. #1
    Join Date
    Apr 2013
    Location
    Bordeaux, France
    Beans
    136
    Distro
    Ubuntu 13.04 Raring Ringtail

    How to put samba in your environment Path

    If you installed samba from git, by default it goes in /usr/local/samba/.../...

    Here is a way to configure is so you can use samba commands from anywhere..

    Just edit your /etc/environment file :

    Code:
    sudo nano /etc/environement
    now add :/usr/local/samba/bin:/usr/local/samba/sbin before the ending quote

    Save and close.

    Now you can use your samba commands from anywhere at the prompt without having to type /usr/local/samba/.../.../
    One step further might be one step too far...

  2. #2
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: How to put samba in your environment Path

    Or ... change just YOUR settings and not those for the entire installation by modifying your ~/.bashrc file. Add a line like this:
    Code:
    export PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin
    Notice how I added a personal "$HOME/bin" to my path? That is handy for any power-user to have their scripts available.

    The enterprising scripter might want to check if /usr/local was already inside the path before adding. That line above doesn't prevent multiple additions. PATHs can get overly long with duplicates if we aren't careful.

  3. #3
    Join Date
    Jan 2013
    Location
    Norrkoping, Sweden
    Beans
    149
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to put samba in your environment Path

    What are the benefit and downsides between these two?
    What ya need my signature for? It's not like it's my last will, or something!

  4. #4
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: How to put samba in your environment Path

    Post #2 has the benefits and downsides ... or did I miss something?

  5. #5
    Join Date
    Apr 2013
    Location
    Bordeaux, France
    Beans
    136
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to put samba in your environment Path

    Yep that's true.

    BUT...

    If Samba 4 is installed as an AD server, having only the administrator loging, it doesn't change much.
    You don't create multiple profiles with the ability to login and play with your LDAP server on an enterprise infrastructure.
    anyway, I wouldn't.
    One step further might be one step too far...

Bookmarks

Posting Permissions

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