Posts

ZAMP a windows portable LAMP webserver

Hi folks, recently I was searching for a good "test" easy to use and stable webserver for a windows box. I found and tried some packages with the surprise that NONE was reliable or stable enough. Even the famous XAMPP didn't passed my tests. So I decided to gather the tools together and create a webserver package with a LAMP stack. Even I didn't want to "install" it on de windows box or start services on boot! I came with a package called "ZAMP". Here below some specs: "Zanfi" Apache (2.4.39) MariaDb (10.4) Php (7.3.7) webserver This webserver runs as standalone as default in a directory. Make in the root of the C: a directory named zamp and put the content in it. This is a development environment. Do not use it for production. Double click the zamp.hta file to start Apache webserver and MySql database server. "NO" service is installed. You have to start and stop manually the two servers. Windows firewall will

SOLVED: Can't establish a reliable connection to the server Google play store

Image
A couple of days ago I faced a nasty problem with my Android phone: It was not able to sign in the Google account / store. I thaught it was a temporary issue at Google's servers and I tried a couple of hours later, but nothing changed. I tried some usual things like clearing the cache of some apps, restart the phone and even change my Google account password and I resetted the phone twice to fabrics defaults. Nothing could help. I searched a lot of info on the internet and I found a hint about the hosts file. The hosts file is a computer file used by an operating system to map hostnames to IP addresses . I red that in some phones in the hosts file the adress to android.clients.google.com is translated to a certain IP address(es). Bang! what if Google changes the IP address for this domain? The first thing I needed to do was to root the phone and gain permissions to open the hosts file. I used Kingo ROOT which is a simple software to root the Android phones. After that, I

create a samba share and user

I found a lot of posts intended to explain how to create a samba share and user that would work even connecting from a Windows box. Unfortunately lot of these tuto's simply do not work. I was able to do the job this way: #this creates the user in linux sudo useradd -s /bin/true (username) #this will prompt you for a password sudo smbpasswd -L -a (username) #this enables the user sudo smbpasswd -L -e (username) #creates new samba user sudo smbpasswd -a (username) #add username to smbusers file sudo nano /etc/samba/smbusers (linuxusername) = '(username)' #restart samba sudo restart smbd sudo restart nmbd   #Then create a samba share: [share_name] path = /path/to/share read only = no writable = yes guest ok = no create mask = 0755 directory mask = 0755 valid users = username #Where the username is the username just above created

Scheduled updates with cron job

If you want to install updates on a server you may want it done at night when users are sleeping (hopefully). That is not that difficult with a shell script and a cron job . The shell script takes care of calling all the update commands and the cron job schedules the executing and log the output to a custom log file. First the shell script: #!/bin/sh echo "\nUpdate on: $(date)\n" echo 'Update the packages list\n' sudo /usr/bin/apt-get update >> /dev/null 2>&1 echo '\nUpgrade to latest package version\n' sudo /usr/bin/apt-get upgrade --yes echo '\nUpgrade the distribution\n' sudo apt-get dist-upgrade --yes echo '\nCleanup\n' sudo /usr/bin/apt-get autoremove --yes sudo /usr/bin/apt-get autoclean --yes sudo /usr/bin/apt-get clean --yes # # The End # The script executes after all a bit of cleanup. Put the "update.sh" script in a folder and make it executable: $ chmod +x update.sh Now the cron job rule: open

XPDF Segmentation fault (core dumped) SOLVED

I have a friend with a Linux Mint based on Ubuntu 13.04 that has to use a Java program (jnlp); this program has some print features that doesn't open a print dialog but fires XPDF directly. That's very annoying, because there is no possibility afaik to change the default pdf program inside the application. I suppose that the command is hard coded in the application itself. The problem is that XPDF opens and shuts down immediately and no pdf is shown. Launching XPDF from a terminal window the following errors are thrown: $ xpdf main.pdf ***** MediaBox = ll:0,0 ur:595.276,841.89 ***** CropBox = ll:0,0 ur:595.276,841.89 ***** Rotate = 0 Segmentation fault (core dumped) After a lot of trials without any success I found the solution to fix that: sudo apt-get install libfreetype6-dev libmotif-dev wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz tar xzpf xpdf-3.03.tar.gz cd xpdf-3.03 ./configure --with-freetype2-library=/usr/lib/i386-linux-gnu / --with-freetype2-include

Killing orphans and zombies

Image
First please do not misunderstand me about "killing orphans and zombies". I'm for sure not going to hurt people without parents or people that are already dead :-( I'm talking about running processes that can be harmful for your system and shuld be better get killed. First of all a Zombie process is not an orphan process. As the word says, an orphan process is a procees without legitim parent, a zombie process is not alive but still have an entry in parent table. A process can be orphaned either intentionally or unintentionally. Sometime a parent process exits/terminates or crashes leaving the child process still running, and then they become orphans. In Linux/Unix like operating systems, as soon as parents of any process are dead, re-parenting occurs, automatically. Re-parenting processes whose parents are dead, means Orphaned processes, are immediately adopted by special process "init". Take a look to a htop situation where winexe causes a lot of or

Is your Linux log in pswd protected? yes! or...not.

Image
I log in in my linux box with a username and password. I get the feeling that my stuff is more secured and not everyone have the access to it. Nothing is less true! It is easy peasy to change the password and let you in. I'm talking about a standard situation with no encryption or extra protection. How? Get ready... 1. reboot the system and select the Recovery Mode: 2. Now select “root – Drop to root shell prompt” and press “Ok” 3. If you forgot your username enter this command to see all the users: type ls /home you will see the folder of the user (i.g. nooby ) 4. Now use the following command to reset your password: passwd nooby Now enter your new password and confirm it. 5. Reboot typing: exit That’s it, you can now login with your new password. Do you feel now less safe?  If you are worried about this you should probably set various layer of protection such as Password protected bios and grub and encrypted disk information (at least /h