Forum

> > CS2D > Servers > just got a new vps
Forums overviewCS2D overview Servers overviewLog in to reply

English just got a new vps

32 replies
Page
To the start Previous 1 2 Next To the start

old Re: just got a new vps

ohaz
User Off Offline

Quote
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.

old Re: just got a new vps

CrazyPenguin
User Off Offline

Quote
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"
edited 2×, last 09.01.18 01:16:16 pm

old Re: just got a new vps

Yates
Reviewer Off Offline

Quote
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.

old Re: just got a new vps

Baloon
GAME BANNED Off Offline

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

then you can log in to your new user
edited 1×, last 10.01.18 01:32:28 pm

old Re: just got a new vps

CrazyPenguin
User Off Offline

Quote
@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:
...

old Re: just got a new vps

CrazyPenguin
User Off Offline

Quote
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

old Re: just got a new vps

Baloon
GAME BANNED Off Offline

Quote
@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.

old Re: just got a new vps

CrazyPenguin
User Off Offline

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

The guy obviously knows about Linux OS
edited 1×, last 11.01.18 03:59:14 pm
To the start Previous 1 2 Next To the start
Log in to reply Servers overviewCS2D overviewForums overview