PDA

View Full Version : How to run the server as NON-ROOT


paddyhm
27th December, 2002, 10:50 AM
Hi!

Perhaps i have a stupid question:

Can I run the ut2003-Server as no r00t at a server?

I think it is no good idea to run it as R00t all time?

Linux is no Win*. ;)

soox
28th December, 2002, 08:55 PM
yes this works fine (on my server)

elmuerte
29th December, 2002, 04:05 AM
yes and you are advised to run it as non-root, there's no reason why you should run it as root.

paddyhm
29th December, 2002, 12:59 PM
So, "how" can I run it as NON-ROOT?

Can I only make it with "su" ?

Or is there an other way in the Server.ini perhaps?

elmuerte
29th December, 2002, 01:39 PM
Just start the server as a diffirent user. I presume you've read the basic Linux HOW-TOs, if not, you should.

paddyhm
29th December, 2002, 02:09 PM
Yes, of course.

But I start my Apache as Root and the Apache switches to another User.

And so i only want to know about the diffrent ways to start an UT2003 Server.
:notworthy:

Perhaps It was good, if someone can explains how to make a special ut2003 user for the server.

So, the user must have a login-shell.

useradd ut2003 -g game -d /var/ut2003/ -s /bin/false

does not work.

it must be:
useradd ut2003 -g game -d /var/ut2003 -s /bin/sh
or
useradd ut2003 -g game -d /var/ut2003 -s /bin/bash

So, I did not know that the user must have been a login-shell.

soox
29th December, 2002, 02:16 PM
But I start my Apache as Root and the Apache switches to another User.

to open a ip port <=1024 you need root.....

i think there should also work without any login shell....try the "sudo" command

elmuerte
29th December, 2002, 05:37 PM
Wel actualy, apache runs as root but it's forked childeren chnage to a diffirent user, the root proces still run as root. UT2003 can't do this because it doesn't work like that.
But you can use programs as `su` or `start-stop-daemon` to luanch UT2003 as a user without a valid shell, I think.
But it's better to create a user account with a valid shell and lock the account with: `passwd -l ut2003user`
This way you can only change to that user from root.