Page 1 of 1

Create new user for wrfems

Posted: Mon Aug 26, 2013 9:45 am
by Giancarlo Modugno
Hi, I have the 3.2 WRFEMS version.

I want to create a new user. I have a new user and I want to use the model but, naturally, the EMS.chsrc file doesn't work for this new user. Then, what can I do?

Could I reinstall the wrfems and set up a new user in this way? Could I have any problems with the old user (rewriting, permission, etc..) ?

Re: Create new user for wrfems

Posted: Mon Aug 26, 2013 10:39 am
by meteoadriatic
If you want only new user to be able to use it, then chown -R newuser:newuser wrfems directory, and move .cshrc to the home directory of new user.

If you want both old and new user to be able use it, I never tried that but... you will need to use system group that you will add permissions to modify everything into wrfems directory. It could be bit tricky. In fact, it would be better to copy whole wrfems installation into homedir of every user you want to be able to run it, so that you will have independent installations on the system.

Re: Create new user for wrfems

Posted: Mon Aug 26, 2013 12:35 pm
by Giancarlo Modugno
Yes, I agree for permissions and file copy. But there is a problem: I think that the EMS.cshrc routine, which has all the environment variables, starts when the user "emsuser" is logged.

Then, if I only copy the entire system in the new user fold there is not the EMS.cshrc starting with the loggin; moreover, if I start the same file (EMS.cshrc) from the new user none of the enviroment variables is set (very strange!)

Re: Create new user for wrfems

Posted: Mon Aug 26, 2013 1:00 pm
by meteoadriatic
EMS.cshrc is sourced from .cshrc file inside home directory of the user. That's why new user has to have correct .cshrc file there. Also, pay attention in .cshrc of new user, you must adjust correct path:

Code: Select all

# Source EMS.cshrc
#
if (-f /usr1/wrfems/EMS.cshrc) source /usr1/wrfems/EMS.cshrc
Set those paths to point to actual files inside new users installation.

Re: Create new user for wrfems

Posted: Mon Aug 26, 2013 3:45 pm
by Giancarlo Modugno
Ok, I have found the .cshrc in the emsuser home directory but no in the "new user" directory so I have created it with the only two following lines:
#!/bin/tcsh
if (-f /usr1/wrfems/EMS.cshrc) source /usr1/wrfems/EMS.cshrc
Anyway, after the login with "new user" the problem persists.

NB: the wrfems fold is in the /usr1/ directory, not in the user home, then I hope that it could be attainable by all the users...!

Re: Create new user for wrfems

Posted: Mon Aug 26, 2013 5:59 pm
by meteoadriatic
I still strongly suggest that you make independent installations for each user. This way things could go little bit crazy. But go on if you insist.

Now about .cshrc, it is not enough to use only those lines. Copy whole file there.

Does your new user have permission to access whole /usr1/wrfems ? Does your new user defaults to tcsh shell on login?

Re: Create new user for wrfems

Posted: Wed Aug 28, 2013 2:27 pm
by Giancarlo Modugno
meteoadriatic wrote:I still strongly suggest that you make independent installations for each user. This way things could go little bit crazy.
I have to understand: a new installation requires to download another time the all system (about 10-15 Giga if I have a good memory...)?

I tried to start the ems_install.pl routine but it asked me to install a "emsuser" user... then I stopped it to avoid any problems with the actual installation... Was I wrong ?
But go on if you insist.

Now about .cshrc, it is not enough to use only those lines. Copy whole file there.
Done, it doesn't work

Does your new user have permission to access whole /usr1/wrfems ? Does your new user defaults to tcsh shell on login?
Yes. Bash

Re: Create new user for wrfems

Posted: Wed Aug 28, 2013 6:09 pm
by meteoadriatic
Giancarlo Modugno wrote:Bash
Of course it doesn't work. it MUST be tcsh.

Do as root:

Code: Select all

chsh -s /bin/tcsh <newuser>
About duplicating installation, the easiest way; log in as root, then copy whole wrfems directory into home directory of new user. When you do that, change those mentioned lines in new user's .cshrc to represent new user's EMS.cshrc path. You don't need to download anything and you don't need to use installer script again.