4

In a linux machine, we may have to compile our programs with respect to that linux machine.

Now, if we already have some other users (not root. A typical user.) who have already compiled many programs for this machine, is it possible to do something like this?

For instance, user oldGuy got mpirun, python, and several other programs in his home directory, and he can invoke "mpirun" or any other binaries in his directory without having to type "./mpirun". He also has various other settings done.

Now, suppose we have a new user called newGuy. If in our server, oldGuy already has compiled all the binaries that newGuy wanted, instead of having the newGuy wasting his time compiling programs that oldGuy already has and set everything correctly, can the newGuy "inherit" some binaries, settings, etc. from oldGuy?

For example, oldGuy can simply invoke "mpirun" right from Bash, can newGuy do anything in order to be on the same page (all identical settings) with oldGuy right away, without having to compile the programs and set other settings, etc?

Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Karl
  • 5,373
  • 12
  • 67
  • 103

1 Answers1

4

The oldGuy home directory has all the stuff you need, so you can copy all the files in there in the newGuy home.

A better approach: when you add a new user to the system the content of the /etc/skel is used as a skeleton for creating the new user's home. So you can customize the /etc/skel directory adding all the stuff you want for every new user you're going to add to the system.

Take a look here and here for some examples.

Atropo
  • 11,252
  • 4
  • 43
  • 57
  • Depending on your configuration of e.g. MPI, you might need to check, whether newGuy is at least in the same group as oldGuy. Sometimes, an MPI program can only be launched, if you are member of some special group. – s-m-e Jan 15 '13 at 12:48