Another Sad Face Kodi Raspberry Pi 2 after modifying sudoers [Solved]

I have a Rasberry Pi 2 Model with 16G Sandisk SD Card

Attached:
USB 2.4GHz dongle (for wireless remote control)
USB to SATA adapter
C-Media Soundcard

Build: OSMC running Kodi 16.1 compiled 29 Oct 2016

I’m also running a Webiopi server:
http://webiopi.trouch.com/

(Webiopi used as a separate media centre, audio output via C-Media USB sound card)
I have also installed Python3, wiring Pi, mplayer,vlc, eboard, mpc, mpd and some linux utils,
lsof, grc, ccze, htop, nmap

Everything has worked flawlessly since about June 16, I never turn OSMC off due to its low power consumption. Also have a SATA hard drive for storage which i connect to with sshfs or sftp.
After transferring two file to my hard drive from another linux machine, I notice the kodi screen had
dimmed and not responding to CEC commands from a TV remote or my wireless keyboard.

I could access via SSH so unmounted the hard drive and rebooted. Now Im stuck with an alternating
white sad face on blue background which alternates to grey, then bluw with smiley face.

I still have access via ssh and ssh -X

So far I’ve tried:
sudo dpkg --reconfigure -a
sudo apt-get update
sudo apt-get dist-upgrade

My sdcard / is RW and not full, I have tried moving
osmc/.kodi to osmc/.kodibak and rebooted, but still have sad face.

Have done
grab-logs -A

http://paste.osmc.io/qokabahite

What I have have found is that if I access OSMC via SSH and start kodi with
kodi

at the command prompt, then kodi starts and displays on my TV screen with the confluenec
skin, but if I try to play or stream any media, then the sad screen appears again,
I note that the pastebin has many entries with:

root : user NOT in sudoers ; TTY=unknown ; PWD=/ ; USER=osmc ; COMMAND=/usr/lib/kodi/kodi.bin --standalone -fs --lircdev /var/run/lirc/lircd
Nov 01 07:36:04 osmc mediacenter[413]: root is not in the sudoers file. This incident will be reported

The contents of /etc/sudoers.d/osmc-no-sudo-password

osmc ALL= NOPASSWD: ALL

Thanks in advance, sorry for long post.

Have you moved back your Kodi folder? Your log files indicate that.
Suggest to

mv .kodi .kodi_backup
reboot

After the reboot upload logs with grab-logs -A

kinda reminds me of the sudo-real stuff that we went thru (@gmc)

@hal8000

what happens if you do this

sudo service mediacenter stop
sudo /usr/bin/mediacenter 

does Kodi boot ?

@fzinken:

Copied kodi_backup back to osmc/.kodi

and rebooted, still sad face. New set of logs on pastebin:

http://paste.osmc.io/obopenineb

@Toast:
I think you may be onto something.
This is the terminal output from SSH:

osmc@osmc:~$ sudo service mediacenter stop
osmc@osmc:~$ htop
osmc@osmc:~$ media
mediacenter mediainfo
osmc@osmc:~$ sudo /usr/bin/mediacenter
Starting Kodi…
root is not in the sudoers file. This incident will be reported.
Kodi exited with return code 1 after 0 hours, 0 minutes and 0 seconds
Starting Kodi…
root is not in the sudoers file. This incident will be reported.
Kodi exited with return code 1 after 0 hours, 0 minutes and 0 seconds

Now each time kodi appears to start, the screen goes grey, then the error,
kodi exited with return code 1 and a blue screen with a :worried: sad face

Root and %sudo are commented out, could this be the problem ?

Thanks for fast replies.

Root and %sudo are commented out, could this be the problem ?

Thanks for fast replies.

N.B. Edit
For some reason the forum is interpreting contents of /etc/sudoers.

I’ve uploaded a png image to imgur below:

It shows #root commented out

mediacenter needs to run as root so

root ALL=(ALL:ALL) ALL

might be a good idea

When was your /etc/sudoers file modified? That’s not the standard one that ships with OSMC.

As @toast says you need to uncomment the root line.

The osmc line is wrong also, shouldn’t be there, it should be in 3 files contained in /etc/sudoers.d/ and osmc shouldn’t have a password in sudo either. You’ll have problems using MyOSMC (and possibly starting kodi) if you insist on the osmc user having a password.

OK success at last. Used visudo and uncommented root and the osmc line.
I must have modified /etc/sudoers in June as it has been working fine until
yesterday.

@yknivag

There are 3 files in /etc/sudoers.d/

osmc@osmc:/etc/sudoers.d$ ls -l
total 16
-r–r----- 1 root root 53 Oct 16 18:53 osmc-disable-rbp-update
-r–r----- 1 root root 29 Jun 21 16:26 osmc-no-secure-path
-r–r----- 1 root root 28 Jun 21 16:26 osmc-no-sudo-password
-r–r----- 1 root root 958 Jan 11 2016 README

I am hoping these are standard and my modifies /etc/sudoers
file:

(For some reason I cant paste the contents of sudoers onto the forum direct as it
changes the formatting text size and omits leading # )

I cannot remember why I modified sudoers in the first place, but if it looks ok
now will mark this post as solved.

Thanks everyone for all your help.

Glad you got it working. Please mark @Toast’s post as the solution using the tick in the box.

For future reference you can use the </> button to post config files and code.

(For some reason I cant paste the contents of sudoers onto the forum direct as it
changes the formatting text size and omits leading # )

Use the </> icon in the post editor to format as code.

1 Like