WeBWorK Main Forum

Admin privileges

Admin privileges

by Jack Dockery -
Number of replies: 1
How do you add a user with admin privileges? For some reason, admin in the admin course only has professor privileges so can't be moved up to admin. I really don't understand this at all, one new course I added has
admin with admin permissions and I can if logged in as admin add other uses and give them admin privileges, an other one does not have admin with admin privileges? It seems to be related to which course I use to get the templates from?
In reply to Jack Dockery

Re: Admin privileges

by Michael Gage -
From the command line on the server you can add an "admin" user to your course and give him administrative privileges (level 20).

cd /opt/webwork/webwork2/bin
wwsh courseName addadmin

This runs the script addadmin on the course courseName.
It creates the user and gives him the password "admin".

If "admin" is already a username in the course then you will get an error.

wwsh courseName putadmin

instead to change the attributes of the user "admin". resetting the password
to "admin" and setting the permission level at 20

The administrative permission level was added a few years ago but if you have courses that you first created several years ago (including the "admin" course) none of the professors in the course will have admin privileges. One way to fix this is to (temporarily) create an "admin" user in the course, login as admin and update other instructors in the course from the web, logout, login as an instructor with newly created admin privileges and then delete "admin" from the list of users in the course. (or at least change the admin password).

You can also mimic the addadmin and putadmin scripts to create other users in the course. See for example webwork2/bin/addprofa.