LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2015, 02:28 AM   #1
link626
LQ Newbie
 
Registered: Sep 2015
Posts: 6

Rep: Reputation: Disabled
I want to run vnc server as non-root user at boot


I don't want someone to hack the vnc server and login to my dedicated server with root privilege.

How do I
1. make vncserver run under regular user privilege,
2. make vncserver start at bootup, running under regular user privilege, without requiring login.
?

Presently, I just install programs like an idiot...
"sudo apt-get install tightvncserver"
and it installs & runs as root.

I would prefer to run vncserver and apache server as low level user with sudo. Not root.

Can anyone show me how to configure this?
 
Old 09-14-2015, 06:39 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
This is a very old LQ thread, but it might be worth a look. It was number two in my search results for "run vncserver as user."

http://www.linuxquestions.org/questi...-local-183633/
 
Old 09-14-2015, 07:46 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Although the apache server needs to be started by root it uses its own user/group ( usually www-data )so doesn't actually run with root priviledges, many applications do tjis thay start as root then switch to a specific user/group and drop root priviledges.
 
Old 09-14-2015, 08:28 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Keith Hedger, just so I follow this, are you saying that vncserver applications (I use x11vnc on my file server, because I wanted to see if I could do it) use Apache as a server engine?

Last edited by frankbell; 09-14-2015 at 08:30 PM.
 
Old 09-15-2015, 05:00 AM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
no I was just telling you how apache works and dousn't need to be started as a normal user as it will drop unneeded privileges when it starts as far as I know vnc servers have nothing to do with apache
 
Old 09-15-2015, 06:09 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Thanks, Keith Hedger. My question was prompted by curiosity solely and was not really related to OP's question.

I use x11vnc on Slackware. If I start it as root, it belongs to root. Normally, I start it as user in "password required" mode. Indeed, I put the command in my Fluxbox startup file, as I am normally logged into the GUI on this machine.
 
Old 09-15-2015, 06:13 PM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by frankbell View Post
Thanks, Keith Hedger. My question was prompted by curiosity solely and was not really related to OP's question.

I use x11vnc on Slackware. If I start it as root, it belongs to root. Normally, I start it as user in "password required" mode. Indeed, I put the command in my Fluxbox startup file, as I am normally logged into the GUI on this machine.
Of course not all severs drop privileges, some like vnc servers can and do operate with full root privilages if started as such, but few such severs really need to be root and in fact it can be a security risk.
 
Old 09-15-2015, 06:55 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Agreed.

I have no idea whether x11vnc is representative of vnc servers. But it works really nice.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
login to the vnc server using new user other than root anis123 Red Hat 2 04-03-2013 12:38 PM
login to the vnc server using new user other than root anis123 Linux - Server 1 04-03-2013 09:08 AM
Can't run root access via VNC stefaandk Linux - General 1 08-25-2006 09:22 AM
run vnc-server as other user in rc.local jvdbossc Linux - Newbie 2 05-26-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration