Sharing same home directory between Solaris and Linux - SUN

This is a discussion on Sharing same home directory between Solaris and Linux - SUN ; Our Unix network runs predominantly Solaris workstations. At login, each user gets his/her own home directory on the network. Recently, the company has introduced Linux PC's into the network. When login, we still get to the same home directory. This ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Sharing same home directory between Solaris and Linux

  1. Sharing same home directory between Solaris and Linux

    Our Unix network runs predominantly Solaris workstations. At login, each
    user gets his/her own home directory on the network. Recently, the
    company has introduced Linux PC's into the network. When login, we still
    get to the same home directory. This causes some problems if you keep
    some Solaris programs in your own /home/xxxx/bin as they obviously don't
    run on Linux. On the other hand, if you have scripts (shell, tcl, perl,
    etc) they will generally run fine on both platforms. What is the common
    practice in handling the situation like this? Are there any good
    references? Thanks!

    /Why Tea

  2. Re: Sharing same home directory between Solaris and Linux

    In article ,
    whytea wrote:

    > Our Unix network runs predominantly Solaris workstations. At login, each
    > user gets his/her own home directory on the network. Recently, the
    > company has introduced Linux PC's into the network. When login, we still
    > get to the same home directory. This causes some problems if you keep
    > some Solaris programs in your own /home/xxxx/bin as they obviously don't
    > run on Linux. On the other hand, if you have scripts (shell, tcl, perl,
    > etc) they will generally run fine on both platforms. What is the common
    > practice in handling the situation like this? Are there any good
    > references? Thanks!
    >
    > /Why Tea


    I've used automounter to mount different versions of various tools on
    different versions of the OS. Solaris' automounter allows for variables
    in maps so that when automounter is run on a machine, that variable can
    be defined or not. In the map, specific mount points were set depending
    on the value of the variable. That worked for the SunOS 4 and Solaris
    environment at SUN.

    At another company, we used cfengine and setup a universal area that
    download a set of wrapper scripts and soft links to mount the proper
    areas for the hetrogeneous environment. Automounter was just to
    different between Solaris, SunOS, SCO, and several flavors of HP/UX. It
    worked on all those releases, but the logic of deciding what got mounted
    was to much for it alone. cfengine could do that for each architecture
    and even individual systems.

    This is probably overkill for you. You may just have users write
    wrapper scripts of they want to run their stuff. All a sysadmin can
    really be responsible for is the systems themselves. If you're going to
    support each users bin directories, you're in for a very busy time.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
    [I filter all Goggle Groups posts, so any reply may be automatically by ignored]



  3. Re: Sharing same home directory between Solaris and Linux

    whytea writes:
    > Our Unix network runs predominantly Solaris workstations. At login, each
    > user gets his/her own home directory on the network. Recently, the
    > company has introduced Linux PC's into the network. When login, we still
    > get to the same home directory. This causes some problems if you keep
    > some Solaris programs in your own /home/xxxx/bin as they obviously don't
    > run on Linux. On the other hand, if you have scripts (shell, tcl, perl,
    > etc) they will generally run fine on both platforms. What is the common
    > practice in handling the situation like this?


    Don't know what others do, but one straightforward way is to put
    executables in $HOME/bin/{sun3,sun4,linux,etc.}/ (unless they're
    specially-built multi-platform files). Then do something such as:

    HOSTTYPE=`/bin/arch`
    PATH=$HOME/bin:$HOME/bin/$HOSTTYPE:rest-of-path

    at login. Or, as you've noted, you can also create wrapper scripts in
    $HOME/bin/.

    For the most part, (IMO) if users are building their own executables, then
    the burden of building versions for each platform they use and keeping the
    results straight falls on them, too, but platform-specific subdirectories
    work reasonably well.
    -WBE

  4. Re: Sharing same home directory between Solaris and Linux

    On Jun 13, 9:35 am, whytea wrote:
    > This causes some problems if you keep
    > some Solaris programs in your own /home/xxxx/bin as they obviously don't
    > run on Linux. On the other hand, if you have scripts (shell, tcl, perl,
    > etc) they will generally run fine on both platforms. What is the common
    > practice in handling the situation like this? Are there any good
    > references? Thanks!


    The standard solution is to keep binaries in architecture, and perhaps
    OS dependent directories, while scripts &c stay in some common
    directory. So for instance, I used to have paths that looked like:

    $HOME/bin/sunos/4.1.1/sun4:$HOME/bin/sunos/4.1.1/sun3:$HOME/bin/BSD/
    4.3/vax:$HOME/bin

    This also demonstrates what can go horribly wrong with a scheme like
    this: insane complexity.

    Another approach (better, I think) is to replace things in bin with
    little wrapper scripts which exec a suitable real binary. This
    somewhat better since the script can generate pathnames in some
    predictable way based on uname output.

  5. Re: Sharing same home directory between Solaris and Linux

    Tim Bradshaw wrote:
    > On Jun 13, 9:35 am, whytea wrote:
    >
    >>This causes some problems if you keep
    >>some Solaris programs in your own /home/xxxx/bin as they obviously don't
    >>run on Linux. On the other hand, if you have scripts (shell, tcl, perl,
    >>etc) they will generally run fine on both platforms. What is the common
    >>practice in handling the situation like this? Are there any good
    >>references? Thanks!

    >
    >
    > The standard solution is to keep binaries in architecture, and perhaps
    > OS dependent directories, while scripts &c stay in some common
    > directory. So for instance, I used to have paths that looked like:
    >
    > $HOME/bin/sunos/4.1.1/sun4:$HOME/bin/sunos/4.1.1/sun3:$HOME/bin/BSD/
    > 4.3/vax:$HOME/bin
    >
    > This also demonstrates what can go horribly wrong with a scheme like
    > this: insane complexity.
    >
    > Another approach (better, I think) is to replace things in bin with
    > little wrapper scripts which exec a suitable real binary. This
    > somewhat better since the script can generate pathnames in some
    > predictable way based on uname output.


    The binary directory part is easily handled by setting PATH using a
    string derived from uname, so there's no need for what you show.

    However, a more vexing task is dealing w/ system dependent directories
    like /usr/ucb or /usr/ccs which only exist on certain platforms or in
    large companies, directory trees that only exist in portions of the
    network. This can be solved by creating the string for setting the PATH
    variable (avoid "path" like the plague! it's not inherited) using a loop
    that tests for the existence of each directory before adding it. This
    prevents an assortment of problems. This does make for a complex .cshrc
    file, but done properly is very robust and portable across all sorts of
    diverse environments. In particular, you can just dump it on a system
    and it will work even if it's not configured for that system or that
    environment. Really helpful if you're a contractor. Mine has been
    configured for as many as 6-7 different systems at times.


    The same logic also works for MANPATH.

    Have Fun!
    Reg

  6. Re: Sharing same home directory between Solaris and Linux

    On Jun 17, 2:57 pm, Reginald Beardsley wrote:

    >
    > The binary directory part is easily handled by setting PATH using a
    > string derived from uname, so there's no need for what you show.
    >


    Yes, and in fact I was wrong about the path: I never had PATHs like
    that. What I *did* have was a complex mass of bin directories for
    architecture & OS versions, which is the insane complexity I (mis)
    remembered.

    --tim

  7. Re: Sharing same home directory between Solaris and Linux

    Tim Bradshaw wrote:
    > On Jun 17, 2:57 pm, Reginald Beardsley wrote:
    >
    >
    >>The binary directory part is easily handled by setting PATH using a
    >>string derived from uname, so there's no need for what you show.
    >>

    >
    >
    > Yes, and in fact I was wrong about the path: I never had PATHs like
    > that. What I *did* have was a complex mass of bin directories for
    > architecture & OS versions, which is the insane complexity I (mis)
    > remembered.
    >
    > --tim


    I *thought* it seemed a bit strange, but it *is* usenet. People do
    surprising things ;-)

    I'll certainly agree it gets a bit messy if you've got the same $HOME
    mounted on a half dozen architectures. Lots of stuff to maintain. In a
    large shop you couldclean it up w/ the automounter, but very few people
    span lots of systems, so not really worth the trouble. However, it's
    pretty cool that it can be made to work at all. At one time I had an
    NCD Xterm w/ windows on a slew of systems all over the place, same
    $HOME. Lot's of opportunities for end runs around problems. I hate to
    think what life would be like if Sun hadn't given the world NFS.

    Have Fun!
    Reg

+ Reply to Thread