Create new user for wrfems

Forum dedicated to older versions of EMS package (WRFEMS v3.2, v3.1 or older). Support is user-to-user based, so please help others if you can.
Post Reply
Giancarlo Modugno
Posts: 59
Joined: Tue Jun 05, 2012 5:25 pm

Create new user for wrfems

Post by Giancarlo Modugno » Mon Aug 26, 2013 9:45 am

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..) ?

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: Create new user for wrfems

Post by meteoadriatic » Mon Aug 26, 2013 10:39 am

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.

Giancarlo Modugno
Posts: 59
Joined: Tue Jun 05, 2012 5:25 pm

Re: Create new user for wrfems

Post by Giancarlo Modugno » Mon Aug 26, 2013 12:35 pm

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!)

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: Create new user for wrfems

Post by meteoadriatic » Mon Aug 26, 2013 1:00 pm

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.

Giancarlo Modugno
Posts: 59
Joined: Tue Jun 05, 2012 5:25 pm

Re: Create new user for wrfems

Post by Giancarlo Modugno » Mon Aug 26, 2013 3:45 pm

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...!

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: Create new user for wrfems

Post by meteoadriatic » Mon Aug 26, 2013 5:59 pm

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?

Giancarlo Modugno
Posts: 59
Joined: Tue Jun 05, 2012 5:25 pm

Re: Create new user for wrfems

Post by Giancarlo Modugno » Wed Aug 28, 2013 2:27 pm

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

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: Create new user for wrfems

Post by meteoadriatic » Wed Aug 28, 2013 6:09 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests