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