Hi, To give superuser permission to the existing user:
1. Go to ```/opt/openwisp``` 2. Find `manage.py` file. 3. Find python environment. (I think it must be called `venv` or `env`) 4. Run `source venv/bin/activate` 5. Run `python manage.py shell` 6. Run ``` from django.contrib.auth.models import User user = User.objects.get(username="myname") user.is_staff = True user.is_superuser = True user.is_admin = True user.save() ``` --- --- --- --- --- --- --- --- Create a new superuser: 1. Go to `/opt/openwisp` 2. Find `manage.py` file. 3. Find python environment. (I think it must be called `venv` or `env`) 4. Run `source venv/bin/activate` 5. Run `python manage.py createsuperuser` Cheers, Ajay Tripathi On Friday, December 24, 2021 at 12:00:24 PM UTC+5:30 [email protected] wrote: > Hi All, > > I disabled the admin SuperUser permission by mistake,can you please tell > me the steps to give superuser permission to admin in command line. > > > > Thank you > -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/d6510004-5b74-4646-9633-8c21e6a1cb5fn%40googlegroups.com.
