2883: Admin User Deleted , need to recover

arjun.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 1, 2013
What version are you running?
1.6

What's the URL of the page containing the problem?


What steps will reproduce the problem?
1. The admin user has been deleted by user error
2. Only 1 user had admin priviliges 
3. Wanted procedure to give a new user admin priviliges

What is the expected output? What do you see instead?


What operating system are you using? What browser?


Please provide any additional information below.
david
#1 david
You can fix this by using the "createsuperuser" management command:

rb-site manage /path/to/site createsuperuser

This should then prompt you for username/email/password to create a new admin
  • +NotABug
#2 arjun.******@gmai***** (Google Code) (Is this you? Claim this profile.)
When i try to execute the command suggested it display error

[root@localhost bin]# ./rb-site manage http://10.5.222.55:8080/reviewboard/account/login/?next_page=/reviewboard/dashboard/ createsuperuser
Traceback (most recent call last):
  File "./rb-site", line 8, in <module>
    load_entry_point('ReviewBoard==1.6.11', 'console_scripts', 'rb-site')()
  File "/opt/reviewboard/apps/reviewboard/lib/ReviewBoard-1.6.11-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1745, in main
    command.run()
  File "/opt/reviewboard/apps/reviewboard/lib/ReviewBoard-1.6.11-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1679, in run
    site.run_manage_command(args[0], args[1:])
  File "/opt/reviewboard/apps/reviewboard/lib/ReviewBoard-1.6.11-py2.7.egg/reviewboard/cmdline/rbsite.py", line 439, in run_manage_command
    os.chdir(self.abs_install_dir)
OSError: [Errno 2] No such file or directory: '/opt/reviewboard/apps/reviewboard/bin/http:/10.5.222.55:8080/reviewboard/account/login/?next_page=/reviewboard/dashboard'
[root@localhost bin]# pwd
/opt/reviewboard/apps/reviewboard/bin
[root@localhost bin]# ls
=2.1,!=2.4  =2.1,!=2.4wget  post-review  pycrypto-2.4  pycrypto-2.4.tar.gz  rb-site  rbssh
chipx86
#3 chipx86
You need to use the site directory, not the URL. Should be something like /var/www/myreviewboard or whatever you called it when you installed.