Project

General

Profile

Resetting admin access

Added by Will Stewart almost 9 years ago

OSMC 2015.11.2
TVHeadEnd 4.0.7 (package off of OSMC App Store)
RPi2

I mistakenly unticked 'admin' on the admin webpage and can no longer return to full admin rights.

I found this very helpful article and began applying it.

However, I am still stuck at at non-admin access, even after switching browsers to avoid password caching.

There are two files, labeled '1', and another with a very long numeric string;

{
"enabled": 1,
"username": "osmc",
"password": "osmc",
"comment": "Default access entry",
"prefix": "0.0.0.0/0,::/0",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
} {
"index": 1,
"enabled": true,
"username": "osmc",
"password2": "VFZIZWFkZW5kLUhpZGUtb3NtYw==",
"prefix": "0.0.0.0/0,::/0",
"streaming": true,
"adv_streaming": true,
"htsp_streaming": true,
"profile": "",
"dvr": true,
"htsp_dvr": true,
"all_dvr": true,
"all_rw_dvr": false,
"dvr_config": "",
"webui": true,
"admin": true,
"conn_limit": 0,
"channel_min": 0,
"channel_max": 0,
"channel_tag": "",
"comment": "Default access entry"
}

In the second file, I set admin to true. Is there anything else I need to do to restore full admin rights?


Replies (4)

RE: Resetting admin access - Added by Prof Yaffle almost 9 years ago

Looks like you have some "ghosts" there... they should all have the long alphanumeric string name now. That's the unique ID, and the password should be in a similar file in $CONFIG/passwd.

That said, you should be okay by simply editing this file. If that doesn't work, make sure you're logging in as superuser ($CONFIG/superuser); and if that doesn't work, sudo dpkg-reconfigure tvheadend should force a new superuser password (although I'd take a config backup first, just to be certain... cp -rp <source> <dest> to preserve ownership and permissions).

RE: Resetting admin access - Added by Will Stewart almost 9 years ago

New to OSMC but tried the dpgk anyway. It didn't work, didn't even realize TVHeadEnd was installed.

I had already uninstalled and reinstalled, so this time I removed all of .hts and then went through the same process.

However, still have non-admin rights. Is there another directory that must be removed as well? I don't know what directory is represented by CONFIG$.

The current file shows;

{
"enabled": 1,
"username": "osmc",
"comment": "Default access entry",
"prefix": "0.0.0.0/0,::/0",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"index": 1,
"adv_streaming": 1,
"password2": "VFZIZWFkZW5kLUhpZGUtb3NtYw=="
}

Any help much appreciated.

UPDATE: Solved. For whatever reason, I started up the interface yet again, which still did not show configuration, and after a few moves through the tabs, suddenly the Configuration tab appeared.

RE: Resetting admin access - Added by Prof Yaffle almost 9 years ago

Apologies, I had Ubuntu on the brain having updated seven systems yesterday... I don't know what distro OSMC is based on or what packaging mechanism it uses, so I assumed dpkg/apt but maybe not.

Just for the record - and I'm pleased that it's just gone away! - by $CONFIG I meant "wherever your config directory is - which may vary based on distro and how you installed". So, on Debian-based, standard installations, this is /home/hts/.hts/tveadend, but it's clearly going to be different on, say, OpenELEC. OSMC could be anything, but you'd already found it when you found those files. In that directory, you have an accesscontrol directory with the user names and privileges; a password directory with the corresponding passwords; and a superuser file with the main admin credentials.

RE: Resetting admin access - Added by Prof Yaffle almost 9 years ago

EDIT: Looks like OSMC is based on Debian Jessie, so it does have dpkg - maybe the "OSMC App Store" uses a different mechanism, then...

    (1-4/4)