English just got a new vps

32 replies
Goto Page
To the start Previous 1 2 Next To the start
09.01.18 08:59:08 am
Up
ohaz
User
Offline Off
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.
https://ohaz.engineer - Software Engineering
09.01.18 01:03:21 pm
Up
CrazyPenguin
User
Offline Off
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
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
09.01.18 02:34:40 pm
Up
Yates
Reviewer
Offline Off
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.
09.01.18 07:25:33 pm
Up
CrazyPenguin
User
Offline Off
@user AtomKuh: Debian 7 32bit

@user Yates: How do I switch to another account ? I just created a username and password but can't login with that only can login with root
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
10.01.18 12:31:20 am
Up
_px 20
GAME BANNED
Offline Off
Code:
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
10.01.18 10:11:54 am
Up
CrazyPenguin
User
Offline Off
@user _px 20:

sudo: usermod-aG:


command not found
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
10.01.18 01:33:11 pm
Up
_px 20
GAME BANNED
Offline Off
@user CrazyPenguin:

Can't you solve it yourself?

sudo usermod -aG NAME sudo
10.01.18 01:48:17 pm
Up
CrazyPenguin
User
Offline Off
@user _px 20: 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

Code:
1
2
3
4
Usage: usermod [options] LOGIN

Options:
...
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
10.01.18 01:50:00 pm
Up
_px 20
GAME BANNED
Offline Off
My bad, try this

sudo usermod -aG sudo NAME
10.01.18 03:26:36 pm
Up
CrazyPenguin
User
Offline Off
Ok I transfered the files to /home/NAME/

And I logged in with new user and ran command

Code:
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
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
11.01.18 09:46:03 am
Up
_px 20
GAME BANNED
Offline Off
@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.
11.01.18 01:43:57 pm
Up
CrazyPenguin
User
Offline Off
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
AFTERLIFE >>24/7<< Online Dedicated Zombie Server ~ Connect IP: 94.177.171.167
To the start Previous 1 2 Next To the start