Run as ROOT ... I really could use some help with this

*nix specific usage questions
yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Run as ROOT ... I really could use some help with this

Postby yvonney » 23 Nov 2008 09:55

Hi All....great to be here!!!!

So, hoping to avoid a flood of advice on not running as root...
I have a box with arch on it that is never on the net... AND I absolutely HAVE to run as root for my experiments...
I'm playing with localhost and a bunch of server stuff I'm studying and would like to bre able to play some music etc.

I have looked into SETuid etc etc etc... I want to modify an install from the arch repository ideally and not have to compile a version though I could do that as well...
I'm kinda busy so i'm hoping to not polute my latest install.

Could someone just give me the facts and/or how-to's on this...
the other thread on run as root is now locked and it seemed to get a bit ....well,
I just really need to run VLC as root if that's ok.

thanks for reading...

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Jean-Baptiste Kempf » 23 Nov 2008 14:07

Well, you can configure it with --enable-run-as-root flag.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 23 Nov 2008 23:38

nice... and concise!
So, would this require a 'build' from source...

I had half hoped that after my package manager auto install I could 'edit' something and that would work.
I have VLC installed though it won't run of course.
I read the other thread and got lots of pointers though have had no luck figuring out how to do setuid etc.

and I guess I'll have to study up if that is what is needing to be done IF it requres a build from source...
I untar the package...
then I look for a certain file?
Or, as it's confiruring or making I edit something?
any gotchas to look out for?

hmmm.... fascinating....! Any help on this would be great...

I miss VLC since going all linux :-)

big thank and best wishes to all!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Jean-Baptiste Kempf » 23 Nov 2008 23:47

You can use vlc-wrapper, but I don't know how.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 24 Nov 2008 00:35

right.... hehehe I read about that... tried and failed myself...
yep, I don't know how either ... big thanks for the reminder though!

DrGkill
Blank Cone
Blank Cone
Posts: 10
Joined: 29 Nov 2008 11:00

Re: Run as ROOT ... I really could use some help with this

Postby DrGkill » 29 Nov 2008 18:34

Running vlc with another user is not so difficult ...

Code: Select all

# su - myuser -c 'vlc my_args'

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 29 Nov 2008 19:22

Thanks, though I don't have any other user other than root.... And, were I to add another user it would change everything. Setting, everything!
I'll figure out VLC can be run as root someday...
I respect the issues raised on this of course though. ie. run as root.

mathan
New Cone
New Cone
Posts: 2
Joined: 04 Dec 2008 01:09

Re: Run as ROOT ... I really could use some help with this

Postby mathan » 04 Dec 2008 01:16

VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root first and
cannot be run by non-trusted users first).


pleasse help me how to run vlc run as root on fc10

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 05 Dec 2008 04:32

Thank you!
yep that is what I am trying to figure out... I have REALLY studied to figure out how work with this message when I try to run as root:

use vlc-wrapper (make sure it is Set-UID root first and
cannot be run by non-trusted users first)



AND of course THIS when I try to run vlc-wrapper

Cannot determine unprivileged user for VLC!


So.... I am holding my breath that someone would help me get VLC running as root on my test machine...

nice of you to read thanks.

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Run as ROOT ... I really could use some help with this

Postby xtophe » 05 Dec 2008 16:33

The alternative methods are
sudo vlc-wrapper --options as the user you want vlc to be run
or
SUDO_UID=4212 vlc-wrapper as root
Xtophe

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 05 Dec 2008 22:46

Wow xtophe ...! Well something happened!
Any idea what is causing this?? I use arch linux ....
After getting these errors I created 2 folders in /root/.config
like vlc/vlcrc

no change though.... is there a file that's a config missing I wonder.... or do I maybe need dvdnav ?? qt4 is installed... not finding it maybe?

I am always running as root so maybe that's part of the problem when I run SUDO_UID=4212 vlc-wrapper as root (see below thanks!)
My root user name IS root .....

big Big BIG thanks for getting me this far! :-)

bash-3.2# SUDO_UID=4212 vlc-wrapper as root
VLC media player 0.9.8a Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--prefix=/usr' '--enable-dvdread' '--enable-dvdnav' '--enable-madi' '--enable-ffmpeg' '--disable-rpath' '--enable-qt4' '--enable-faad' '--enable-alsa' '--enable-skins2' '--enable-dvb' '--enable-dmo' '--with-ffmpeg-faac' '--with-ffmpeg-vorbis' '--with-ffmpeg-dts' '--with-ffmpeg-ogg' '--with-ffmpeg-theora' '--enable-v4l' '--enable-theora' '--enable-flac' '--enable-snapshot' '--enable-hal' '--enable-dbus' '--enable-ogg' '--enable-dbus-control' '--enable-shared' '--enable-nls' '--enable-lirc' '--enable-shout' '--enable-pvr' '--enable-release' '--program-suffix=' '--with-dv-raw1394=/usr/include/libraw1394' '--enable-loader' '--enable-live555' '--with-live555-tree=/usr/lib/live-media' 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'CXXFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'PKG_CONFIG_PATH=:/opt/kde/lib/pkgconfig:/opt/qt/lib/pkgconfig'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc error: cannot open config file (/root/.config/vlc/vlcrc): Permission denied
[00000371] inhibit interface error: Failed to connect to the D-Bus session daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[00000371] main interface error: no suitable interface module
[00000001] main libvlc error: interface "inhibit,none" initialization failed
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
No protocol specified
[00000374] qt4 interface error: Could not connect to X server
No protocol specified
[00000374] skins2 interface error: Cannot open display
[00000374] skins2 interface error: cannot initialize OSFactory
Remote control interface initialized. Type `help' for help.
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat as
No such file or directory
libdvdnav: vm: faild to open/read the DVD
[00000377] access_directory access error: as: No such file or directory
[00000377] access_file access error: cannot open file as (No such file or directory)
[00000375] main input error: open of `as' failed: could not create access: no suitable access module
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat root
No such file or directory
libdvdnav: vm: faild to open/read the DVD
[00000380] access_directory access error: root: No such file or directory
[00000380] access_file access error: cannot open file root (No such file or directory)
[00000378] main input error: open of `root' failed: could not create access: no suitable access module

cmuller13
New Cone
New Cone
Posts: 1
Joined: 16 Dec 2008 17:20

Re: Run as ROOT ... I really could use some help with this

Postby cmuller13 » 16 Dec 2008 18:05

Hello,

I just upgraded to Intrepid Ibex and ran into this non-root-enforced problem myself. I think that you have data access problems. My solution was to make an alias to "sudo -u normaluser vlc" and run this alias as root. However the normaluser id did not have write access permissions to a couple of dirs which I had to changed under /root: /root/.config/vlc/ and /root/.cache/vlc/. By creating these directories with the right umask for the id you are trying to use should solve the problem.

As a side note, I feel really not very respected with the way vlc developpers are replying on this issue, especially on the locked thread. I understand their concern but not one solution can apply to all cases. Some people have no problem with using root and no risk of anything whatsoever (behind firewalls, no viruses). I agree with the chosen default but not with the options to recompile instead of allowing an (advertised as risky) --allow-root-usage runtime option. Free software developers are giving a lot of their time, I understand that, and have sometimes strong opinions, fine. Morever they are right, fine again. But when they code to force their users to do something, there is somehow a line that is crossed here, so yes you are right, but please let us decide "non default" usage. That would be really nice :-).

Rémi Denis-Courmont
Developer
Developer
Posts: 15067
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Rémi Denis-Courmont » 16 Dec 2008 18:26

Whether to allow running root on Linux is up to the distributions. The VideoLAN project recommends against it. Distributions are free to compile VLC however they want. At least Ubuntu abd Debian maintainers appear to agree with us.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hedlunch
New Cone
New Cone
Posts: 1
Joined: 19 Dec 2008 02:24

Re: Run as ROOT ... I really could use some help with this

Postby hedlunch » 19 Dec 2008 02:48

While I honestly believe that VLC is a better video player than Xine the difficulty of running VLC as root is forcing me to abandon VLC. Thankfully, Xine is perfectly usable although I miss VLC. I've been using Linux exclusively for 10 years. I ALWAYS run as root. I left windows because I don't like this sort of hand-holding. I don't want people telling me what I can and cannot do with my computer. It's ironic that in the "We know what's best for you" world of Windows, that it's trivial to install and run VLC as the administrator "out of the box". Where-as with Fedora it's recently become difficult to the point where VLC is COMPLETELY USELESS. This is paranoia making Linux more difficult to use and less accessible. I'm sad that VLC is now only available to me on computers running Windows or MacOs.
""

Alessandro17
New Cone
New Cone
Posts: 1
Joined: 21 Dec 2008 12:27

Re: Run as ROOT ... I really could use some help with this

Postby Alessandro17 » 21 Dec 2008 12:43

I have been using Linux since the 8xxx SUSE releases.
I have always worked as root, never a problem except for the ones caused to me by the developers (like this one).
For the past 3 months I had been without ADSL, and no Linux driver for my dial-up modem. Thus I had to use Windows. I use XP x64. All old problems with drivers and programs have been solved, it is a good OS. The same can be said of OS X. Everything works out of the box without problems.
I am considering abandoning Linux, solutions are being imposed upon the users worse than in proprietary operating systems (See also the much hated KDE4).
Sorry for the rant.

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 27 Dec 2008 01:34

Thanks everybody... this is a small thing though for me as it's a learning thing as well. Makes me a better Linux user,
um, I can barely work with my windows boot anymore...
Linux is so comfortable.

I am still attempting to run as root. Not that big a deal and good fun figuring it out.

best wishes to all!

bloginfo
New Cone
New Cone
Posts: 1
Joined: 27 Dec 2008 14:39

Anothers Ayatollahs for Fedora 10 ?

Postby bloginfo » 27 Dec 2008 14:51

I'm very disappointed by the fact that I can't run Vlc on my Fedora 10 on the root account. It's a very stupid decision.

After 10 years on Linux Os, I don't understand and I don't agree with this choice. So, I've installed Mplayer and Kplayer. It runs as well as Vlc.

Truely yours.

-> In French, here

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 27 Dec 2008 21:54

WHEN I run THIS:
bash-3.2# SUDO_UID=4212 vlc-wrapper as root

I get this on Arch Linux ANY IDEAS APPRECIATED FOR SURE! :--) :


----------------------
VLC media player 0.9.8a Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--prefix=/usr' '--enable-dvdread' '--enable-dvdnav' '--enable-madi' '--enable-ffmpeg' '--disable-rpath' '--enable-qt4' '--enable-faad' '--enable-alsa' '--enable-skins2' '--enable-dvb' '--enable-dmo' '--with-ffmpeg-faac' '--with-ffmpeg-vorbis' '--with-ffmpeg-dts' '--with-ffmpeg-ogg' '--with-ffmpeg-theora' '--enable-v4l' '--enable-theora' '--enable-flac' '--enable-snapshot' '--enable-hal' '--enable-dbus' '--enable-ogg' '--enable-dbus-control' '--enable-shared' '--enable-nls' '--enable-lirc' '--enable-shout' '--enable-pvr' '--enable-release' '--program-suffix=' '--with-dv-raw1394=/usr/include/libraw1394' '--enable-loader' '--enable-live555' '--with-live555-tree=/usr/lib/live-media' 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'CXXFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'PKG_CONFIG_PATH=:/opt/kde/lib/pkgconfig:/opt/qt/lib/pkgconfig'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc error: cannot open config file (/root/.config/vlc/vlcrc): Permission denied
[00000371] inhibit interface error: Failed to connect to the D-Bus session daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[00000371] main interface error: no suitable interface module
[00000001] main libvlc error: interface "inhibit,none" initialization failed
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
No protocol specified
[00000374] qt4 interface error: Could not connect to X server
No protocol specified
[00000374] skins2 interface error: Cannot open display
[00000374] skins2 interface error: cannot initialize OSFactory
Remote control interface initialized. Type `help' for help.
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat as
No such file or directory
libdvdnav: vm: faild to open/read the DVD
[00000377] access_directory access error: as: No such file or directory
[00000377] access_file access error: cannot open file as (No such file or directory)
[00000375] main input error: open of `as' failed: could not create access: no suitable access module
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat root
No such file or directory
libdvdnav: vm: faild to open/read the DVD
[00000380] access_directory access error: root: No such file or directory
[00000380] access_file access error: cannot open file root (No such file or directory)
[00000378] main input error: open of `root' failed: could not create access: no suitable access module

----------------------

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Anothers Ayatollahs for Fedora 10 ?

Postby Jean-Baptiste Kempf » 30 Dec 2008 17:19

I'm very disappointed by the fact that I can't run Vlc on my Fedora 10 on the root account. It's a very stupid decision.

After 10 years on Linux Os, I don't understand and I don't agree with this choice. So, I've installed Mplayer and Kplayer. It runs as well as Vlc.

Truely yours.

-> In French, here
You are a so-called expert and you don't know how to use a wrapper?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Jean-Baptiste Kempf » 30 Dec 2008 17:19

libdvdread: Encrypted DVD support unavailable.
----------------------
Install libdvdcss.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Rémi Denis-Courmont
Developer
Developer
Posts: 15067
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Rémi Denis-Courmont » 02 Jan 2009 11:35

vlc-wrapper is meant for NON-ROOT users to obtain a few privileges that may be of use to VLC, namely binding to the TCP RTSP port or getting real-time priorities.

It is in no way designed for root to run VLC (you wouldn't need a wrapper for that).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

yvonney
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Nov 2008 09:45

Re: Run as ROOT ... I really could use some help with this

Postby yvonney » 07 Jan 2009 07:41

GLAD I was able to pop by..... THANK YOU j-b !!!!!

YOU are site-admin....and really a star... let's smile everyone!!!!!!!!!!!
um, if you want to of course!

And for me, actually, nothing really upsets me.... So, best wishes to everyone..

I would also like to thank other repliers, and Rémi Denis-Courmont recently replying.

I find VLC is standout wonderful.... really really really... years and years now of it being best for me.


I find VLC and mplayer and I think it's called xine on my linux box are all cool cool cool !!!


Still unable to run as root.... and yes... the line I was typing didn't really make sense though I didn't have any options.... in my brain... hehehe

This line didn't make sense though a lot sure happened !!!! :---)
SUDO_UID=4212 vlc-wrapper as root

So... yes, I AM root, and I'm the ONLY user on my linux box...
it's been an amazing year as I only use linux now for everything it's WAY cool and so comfortable not..

I'm still somewhere around average though.

Hey, here's an off-topic.... has anyone tried GScrot??

It's a really really cool screen capture program.... does tons...!

ANYHOOO.... so, um...
how would I run as root... I mean what would I mod or type....uhhhh.... exactly....

eek!!

y

jnjb
New Cone
New Cone
Posts: 1
Joined: 11 Apr 2009 21:23

Re: Run as ROOT ... I really could use some help with this

Postby jnjb » 11 Apr 2009 21:42

Hello all im new hear but a litle question i try to make my own backport of vlc for squeeze to lenny but have the same problem but at build and not use, if someone can help me.


# Check which plugins were built and whether they load properly.
./vlc -vvv --reset-plugins-cache --list --no-color
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use /usr/src/vlc-0.9.8a/bin/.libs/lt-vlc-wrapper (make sure it is Set-UID root first and
cannot be run by non-trusted users first).
make: *** [build-stamp] Erreur 1

The--Captain
New Cone
New Cone
Posts: 1
Joined: 27 May 2009 08:55

Re: Run as ROOT ... I really could use some help with this

Postby The--Captain » 27 May 2009 09:21

Either restrict running VLC as Administrator by default in Windows, or enable running it as root by default in unix.

Pretending that your primary concern is security when the Windows platform is obviously more vulnerable is just hypocritical sanctimonious bullcrap.

Obviously, given a unix system, a technically-inclined user can handle adjusting the configurations appropriately, but mom and dad (let alone grandma and grandpa) are likely to be using Windows, running an account with Administrator access...

Even if you were to simply admit that you can't risk annoying your core base of users (non-technical Windows users), but that you are trying to implement an application-based security policy that you hope to someday extend to the Windows community, that would be a lot better than talking out of both sides of your mouth when it comes to justifying your default configuration choices.

Cheers.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Run as ROOT ... I really could use some help with this

Postby Jean-Baptiste Kempf » 27 May 2009 10:51

Blabla.

VLC is used a lot as a server on Unix, not on Windows.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 3 guests