Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
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.
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?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
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
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
Quote:
Originally Posted by frankbell
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.