Closed Rohitesh-Kumar-Jain closed 3 years ago
Sorry for the delay. First, if you get ModuleNotFoundError: No module named 'omw'
, then try specifying PYTHONPATH
to help it along:
(env) $ PYTHONPATH=. python scripts/add-user.py -h
usage: add-user.py [-h] [--user USER] [--name NAME] [--email EMAIL] [--level LEVEL] [--group {common,admin}] [--affiliation AFFILIATION] db
positional arguments:
db path to the user database
optional arguments:
-h, --help show this help message and exit
--user USER username
--name NAME real name
--email EMAIL email address
--level LEVEL access level (default: 0)
--group {common,admin}
access group (common|admin)
--affiliation AFFILIATION
user's affiliation (default: sys)
From the usage synopsis, it seems like maybe you need to use some options? For instance:
(env) $ PYTHONPATH=. python scripts/add-user.py \
omw/db/omw.db \
--user newUser \
--name realName \
--email email@gmail.com
Thanks for the help 😄
Actually, I was also using the wrong path to the database, as the users table is in the admin.db
PYTHONPATH=. python scripts/add-user.py \ omw/db/admin.db \ --user newUser \ --name realName \ --email email@gmail.com
The above command can be used by new users for reference.
Hi,
I want to create a new user, I tried running this command
OMW % python scripts/add-user.py omw/db/omw.db newUser realName email@gmail.com
I thought that this should work, but this isn't working, how can I make a new user?