orlikoski / Skadi

Collect, Process, and Hunt with host based data from MacOS, Windows, and Linux
https://www.skadivm.com
GNU General Public License v3.0
489 stars 71 forks source link

Ubuntu Build Script Fails to Generate Passwords #89

Closed ecapuano closed 5 years ago

ecapuano commented 5 years ago

At the tail end of the Ubuntu build script, it fails on the step where it attempts to randomly create the credentials. This is a brand new Ubuntu 16.04 system built only for this purpose.

Using random username and passwords for OS Account, TimeSketch, Nginx proxy, and Grafana
==> Creating skadi_HXYs user
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: it is too simplistic/systematic
chpasswd: (user skadi_HXYs) pam_chauthtok() failed, error:
Have exhausted maximum number of retries for service
chpasswd: (line 1, user skadi_HXYs) password not changed
ecapuano commented 5 years ago

Am thinking this might be due to the fact that I had to run the bootstrap script twice. It failed the first time to due missing dependency pip install setuptools.

Looking back at the first pass of the script, those users were created successfully but it never got to the end where the creds are displayed.

orlikoski commented 5 years ago

Interesting. I'm most interested in why it failed and needed the pip install setuptools. Do you remember which command or what part of the output where it failed?

Was this in Ubuntu 16.04 Server or Desktop?

The rest of it has to do with the variables of the script not printing out at the end as you pointed out

orlikoski commented 5 years ago

I think the issue is fixed with a small tweak to the installer. I think you were using the Desktop version and it was failing due to git not being installed by default in the Desktop version of Ubuntu. Try using the new installer (same installation instructions as before) and let me know what happens

ecapuano commented 5 years ago

I was using server

orlikoski commented 5 years ago

Well, if you were using server then let me know how the new installer works. It was tested and built on a 16.04.5 version of Ubuntu Server

orlikoski commented 5 years ago

It might be there is a command character going into the username (like : or / or something)

orlikoski commented 5 years ago

I think that the git and setuptools were red herrings. I think the issue is that some form of command / control characters were going into the username.

orlikoski commented 5 years ago

The build script is updated and now the username is now fixed as skadi. It will make it with a random password generated at run time if the user doesn't already exist.

orlikoski commented 5 years ago

I'm going to close this and I'll re-address if it comes back up. Thanks for letting me know about it

ecapuano commented 5 years ago

Thanks for consolidating a kick ass application stack!