• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

SIMPLE ALL IN ONE: From nothing to a fully working dedicated server on Ubuntu

Hello There!

I'm getting this error, already installed all dependencies, any help?

Code:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required."}
 
Last edited:
@Don Daniello

I was trying to set up a new server and now i'm having this error, have you ever see this before?


Bash:
TASK [Set MySQL otsmanager password (localhost)] *******************************
[WARNING]: Module did not set no_log for update_password
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, u\"Access denied for user 'root'@'localhost'\")"}
 
@Don Daniello

I was trying to set up a new server and now i'm having this error, have you ever see this before?


Bash:
TASK [Set MySQL otsmanager password (localhost)] *******************************
[WARNING]: Module did not set no_log for update_password
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, u\"Access denied for user 'root'@'localhost'\")"}
Hey bro, might be a bit late but i managed to get past that same issue using this command:
mysqladmin -u root -p password
and then just leaving the 'new password' blank
i'm new to this and learning so it might bring issues later IDK yet
at least it got me to install everything smoothly and now i can go from there

hope it helps

grts
 
It's probably something stupid but i hope anyone could have a look @ my issue
i can setup pretty much everything without many problems but Nginx keeps on failing and i can't figure out why
i'm using ubuntu 20, fully updated, ...
anyone got any suggestions on what i could try ?
Screenshot from 2022-04-17 17-55-17.pngScreenshot from 2022-04-17 17-52-39.png
 
its just the nginx configuration test failing because you dont have a valid ssl certificate in your configuration

you could install certbot to redo the certs for the site if you're using https

or edit /etc/nginx/sites-enabled/default configuration for ssl_certificate
 
its just the nginx configuration test failing because you dont have a valid ssl certificate in your configuration

you could install certbot to redo the certs for the site if you're using https

or edit /etc/nginx/sites-enabled/default configuration for ssl_certificate
thanks for the quick reply!

so a quick recap for future noobs
  • fresh install ubuntu no updates etc
  • run first command and second command
  • get certificate trought this link: Self Signed SSL/TLS Certificate with IP Address (https://nodeployfriday.com/posts/self-signed-cert/)
  • rename certificate to ssl-cert-snakeoil.pem and place it in /etc/ssl/certs
  • rename certificate to ssl-cert-snakeoil.key and place it in /etc/ssl/private
  • run the 3rd command - i had error on mysqladmin so had to run this command => mysqladmin -u root -p password
  • run the 3rd command again and it all completed "Failed=0"

if i come across more issues i will update this.
hope it helps anyone and thanks for the help to everyone who posts solutions across the internet <3
 
Last edited:
Just fooling around some with a new server and trying to download your package but I fail at even the first step haha
XXXX@buntu:~$ sudo apt install -y -q python-simplejson python3-pymqsl git ansible aptitude
Reading package lists...
Building dependency tree...
Reading state information...
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package python-simplejson
E: Unable to locate package python3-pymqsl
E: Unable to locate package ansible
E: Package 'aptitude' has no installation candidate

Any clue what might be wrong?

Edit found out it was DNs issue, resolved it ;]
Post automatically merged:


Just fooling around some with a new server and trying to download your package but I fail at even the first step haha
XXXX@buntu:~$ sudo apt install -y -q python-simplejson python3-pymqsl git ansible aptitude
Reading package lists...
Building dependency tree...
Reading state information...
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package python-simplejson
E: Unable to locate package python3-pymqsl
E: Unable to locate package ansible
E: Package 'aptitude' has no installation candidate

Any clue what might be wrong?

Edit found out it was DNs issue, resolved it ;]
So I got past this point and finished all the commands, however wtf is the next steps after running them? haha
 
Last edited:
Remember to always change password to otsmanager user!
I saw 3 VPSes hacked last month, because owners left user account otsmanager with password otsmanager.
Some botnet is scanning whole internet using otsmanager/otsmanager login:
Code:
Jul 11 15:17:18 xxx sshd[86870]: Accepted password for otsmanager from 104.131.102.169 port 60170 ssh2
When they get access, they start mining crypto on CPU (using process named kswapd0) and install backdoor.

This will:
  • Create a system user "otsmanager" with password "otsmanager"
I think it should be changed. This tool should not run at all without password delivered by user or generate random password.
 
Remember to always change password to otsmanager user!
I saw 3 VPSes hacked last month, because owners left user account otsmanager with password otsmanager.
Some botnet is scanning whole internet using otsmanager/otsmanager login:
Code:
Jul 11 15:17:18 xxx sshd[86870]: Accepted password for otsmanager from 104.131.102.169 port 60170 ssh2
When they get access, they start mining crypto on CPU (using process named kswapd0) and install backdoor.


I think it should be changed. This tool should not run at all without password delivered by user or generate random password.
Better yet, disable pw auth and use ssh keys once everything is setup.
 
Remember to always change password to otsmanager user!

🤦‍♂️

A shame it even needs to be said really.

I actually edited the script to use a different username as well. The service could be changed to set a custom username and generate a random password like it does for sql.
 
Better yet, disable pw auth and use ssh keys once everything is setup.
It's obvious for Linux users, but this script is often used by newbies who buy first VPS and got no idea how to configure everything.
They don't know/understand what this script does and how to use passwd.
 
Last edited:
It's obvious for Linux users, but this script is often used by newbies who buy first VPS and got no idea how to configure everything.
They don't know/understand what this script does and how to use passwd.
Fair enough. Maybe adding an advanced tutorial or second part would be good then. The hosting provider is still going to hold them liable if their vps gets brute-forced/compromised and becomes part of a botnet or otherwhise engages in criminal behaviour. I get what you are saying, though. For an isolated local vm on e.g. virtualbox, or WSL this may be totally fine as long as it's not public facing. A public-facing vps is another story, though.
 
I don't know if this is still working? It says it creates forgottenserver in otsmanager, amongst other things but there is nothing actually listed there.. seems to be missing a lot of things? I booted up a new dedicated server cloud host and only ran the 3 scripts it said.
Using Ubunto 20.04
 
Could anyone help me with this? :p

TASK [Import database for TFS] *************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "ERROR 1062 (23000) at line 360: Duplicate entry 'db_version' for key 'PRIMARY'\n"}
edit: stuck here forever
2ac8c822bf5f97f35b573c20ac2eb8f2.png
 
Last edited:
Can anyone help? :)

Code:
ots@ots:~$ sudo ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t default,phpMyAdmin,DevAAC,tfs,tfs-old -C ubuntu1804
Starting Ansible Pull at 2022-08-26 21:52:12
/usr/bin/ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t default,phpMyAdmin,DevAAC,tfs,tfs-old -C ubuntu1804
[WARNING]: Could not match supplied host pattern, ignoring: ots
localhost | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "cmd": "/usr/bin/git ls-remote https://github.com/DevelopersPL/otshosting-provisioning.git -h refs/heads/ubuntu1804",
    "msg": "fatal: unable to access 'https://github.com/DevelopersPL/otshosting-provisioning.git/': Could not resolve host: github.com",
    "rc": 128,
    "stderr": "fatal: unable to access 'https://github.com/DevelopersPL/otshosting-provisioning.git/': Could not resolve host: github.com\n",
    "stderr_lines": [
        "fatal: unable to access 'https://github.com/DevelopersPL/otshosting-provisioning.git/': Could not resolve host: github.com"
    ],
    "stdout": "",
    "stdout_lines": []
}
 
Can someone help me with this?
Im using Ubuntu 20.04 and have installed it clean.

Code:
TASK [Set MySQL otsmanager password (localhost)] *************************************************************************************************
[WARNING]: Module did not set no_log for update_password
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

RUNNING HANDLER [restart systemd-journald] *******************************************************************************************************

RUNNING HANDLER [restart mysql] ******************************************************************************************************************

PLAY RECAP ***************************************************************************************************************************************
localhost                  : ok=21   changed=15   unreachable=0    failed=1    skipped=2    rescued=0    ignored=0

EDIT: I managed to resolve the issue with MySQL task. But i cannot access phpmyadmin from another computer within the LAN network. I get "Connection lost" when trying serverip : port.
 
Last edited:
Any idea how I can access the log files directly? I'm trying to parse them to get the missing files from an old TFS setup so I can add them. Kinda hard without direct access to the files though.
Post automatically merged:

Any idea how I can access the log files directly? I'm trying to parse them to get the missing files from an old TFS setup so I can add them. Kinda hard without direct access to the files though.
Actually, I ran a journalctl > /home/otsmanager/log and was able to get what I needed. :)
 
Last edited:
@Don Daniello

I was trying to set up a new server and now i'm having this error, have you ever see this before?


Bash:
TASK [Set MySQL otsmanager password (localhost)] *******************************
[WARNING]: Module did not set no_log for update_password
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, u\"Access denied for user 'root'@'localhost'\")"}
How reslove this trouble?
 
Back
Top