Got a few basic questions

Hi i’m new to OSMC and would like to know a few basic things about Kodi/OSMC.

  1. I want to mess around with all the different addons from different Repositories and i know that unofficial repos can always bear the risk to contain malware and what not, but does OSMC or Kodi run itself as root?
    Do Addons have any kind of root access withing Kodi or is it all run as user OSMC?

  2. I heard that there was some troubles with the Xbox360 Wireless Controller (double input) and would like to know if this has been fixed in OSMC Jarvis/16 and if so is there are good tutorial on how to get it running?

I know that it is automatically recognized within Krypton-Builds and i really would love to stay with your Krypton Alpha-Builds as they are pretty much rock solid in most regards but sadly nether my HifiDIY DAC’s nor my Audioquest Dragonfly work within the Krypton Builds.

Btw. I took my Raspberry microsd and tried change the permissions of config.txt to 777 but for some unknown reason this didn’t work nether from my regular nor from a live cd of Debian is there some magic going on there?
I can edit and save the file as root but i don’t seem to be able to change the rights on that specific file to 777 (obviously without rebooting it on the RPi)

Bye :slight_smile:

As user OSMC has full sudo rights technically OSMC can be considered as “root access”

Search for XBox360 in the forum search there are at least 2 threads on the topic as far as I remember.

Not an expert but I doubt that the Kodi Build would have impact on that.

The boot partition on which config.txt is stored is a vfat partition which doesn’t support user rights.

1 Like

Thank you for your throughout answer :slight_smile:

Is it technically possible to change something about the root dilemma?
Is there any reason to grant Kodi/XMBC root-access in the first place or why did OSMC went down that route instead of using a separate account in which all the Kodi Stuff runs?
Normally there is this rule of thumb that goes ‘never run anything as root that doesn’t have the necessity of root access’

@eatyourspinach Kodi doesn’t have root access as such, it runs as the user osmc.

To enable root privileges you have to use the command “sudo” which requires you to enter the password for the user osmc.

NOPASSWD_ALL is defined in /etc/sudoers, so no password needs to be entered.

Untouched file, I’m having to enter osmc password

osmc@osmc:~$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

Something is not right with your system then. You should have /etc/sudoers.d/osmc-no-sudo-password which doesn’t enforce password on sudo. Are you saying the following command prompts for password?

sudo -s

My bad…

osmc@osmc:~$ sudo -s
root@osmc:/home/osmc#

No password required for sudo

I don’t think Kodi would launch if it was required, as there would be a password prompt on a non-existent tty.

This is always something that has bothered me a bit on OSMC as it is a major security hole.

Is there a specific reason that the file in sudoers.d doesn’t contain just the limited list of commands that kodi requires root access for?

This would be much more secure as any other command would then prompt for a password.

I don’t think so.

There are countless ways to get around this anyway, I don’t think it really affects the security of the system.

There are plans in the future to change the way Kodi runs on OSMC though.

4 posts were split to a new topic: Removing need for passwordless sudo for OSMC user