Forum

> > CS2D > Servers > just got a new vps
ForenübersichtCS2D-Übersicht Servers-ÜbersichtEinloggen, um zu antworten

Englisch just got a new vps

32 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: just got a new vps

ohaz
User Off Offline

Zitieren
The basic steps to run cs2d dedicated on your server:

• Create a new user (https://www.cyberciti.biz/faq/howto-add-new-linux-user-account/ )
• Switch to that user
• Go to /home/username/ or ~
• Upload cs2d files into a folder there
• do "chmod +x cs2d_dedicated"
• run cs2d using screen, tmux or similar

Don't use chmod 777 on more than one file ever. It completely disables all permission systems implemented in Linux. Only use root account when absolutely necessary, even then you should try to use sudo instead. Using root for anything allows for attackers to completely take over your system. CS2D definitely has some security issues that could be exploited to gain control over the user it's running on. In case of a new user just for cs2d, that's not too bad, in case of root it's bad.

alt Re: just got a new vps

CrazyPenguin
User Off Offline

Zitieren
Thanks

And how do I lock the root ? Do I use "sudo passwd root" command and create a password that I won't ever need to type in and forget about it ?

Or is my 1st password I log in with root to run the server enough at this point ?



How do I switch to that user and create a folder in FileZilla ? I log in in PuttY with new username and password and it says "could not chdir to home directory" "No such file or directory"
2× editiert, zuletzt 09.01.18 13:16:16

alt Re: just got a new vps

Yates
Reviewer Off Offline

Zitieren
Doesn't matter,
sudo passwd -l root
will suffice.

If you want to enable the root account again, use
sudo passwd root
. This will prompt you for a new password.

Note that the root account is not technically disabled, it's just no longer available to login as root.

You may want to disable root login via SSH as well. This is something I always prefer to do after a new installation of any Linux OS.

Note: Please test that SSH is working correctly with your new user before disabling root login.

alt Re: just got a new vps

Baloon
GAME BANNED Off Offline

Zitieren
1
2
3
apt-get install sudo
sudo adduser NAME
sudo usermod -aG NAME sudo

then you can log in to your new user
1× editiert, zuletzt 10.01.18 13:32:28

alt Re: just got a new vps

CrazyPenguin
User Off Offline

Zitieren
@user Baloon: I would not ask then

sudo usermod -aG NAME sudo


usermod: 'sudo' does not exist


if you do it without last sudo it only displays

1
2
3
4
Usage: usermod [options] LOGIN

Options:
...

alt Re: just got a new vps

CrazyPenguin
User Off Offline

Zitieren
Ok I transfered the files to /home/NAME/

And I logged in with new user and ran command

1
nohup /home/NAME/CS2D/cs2d_dedicated & tail -f nohup.out

And it runs the server fine. Now am I set and can I lock my root account for good ? Will I be able to access my new user ?



chmod +x cs2d_dedicated
does not do anything



by the way I still login in FileZilla with my root account and password is that ok ? Because home/New User is in there but not under root folder

alt Re: just got a new vps

Baloon
GAME BANNED Off Offline

Zitieren
@user CrazyPenguin:

why you need to lock root, when nohup runs without root access?

and yes that's how users work, /root/ folder is for root. And /home/NAME/ is for normal users.

alt Re: just got a new vps

CrazyPenguin
User Off Offline

Zitieren
because @user Yates: said its best to lock root for security reasons

The guy obviously knows about Linux OS
1× editiert, zuletzt 11.01.18 15:59:14
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Servers-ÜbersichtCS2D-ÜbersichtForenübersicht