14 November, 2015

Intel SS4200 processor upgrade and speed benchmark

I have an Intel SS4200 home storage server running Ubuntu 14.04 server at home, and because the read speeds were only around 60 Mbyte/sec, I decided to do a processor upgrade. After the upgrade I had some problems with the fan, and the speed did not significantly increased. Read more for the details.

28 October, 2015

Setting up a 4G modem with network USB emulation with OpenWRT on the MPR-L8 or A5-V11

In my previous post, I have explained how to setup a 3G/4G modem with USB connection emulating a serial device, in this post I will explain, how to set it up with a modem emulating network connection on the USB interface, like the ZTE MF-821D. The same method applies if you want to use an Android phone as a modem.

26 October, 2015

NAS migration and checking with md5

Recently I have migrated from my home made NAS server (no-name desktop PC with Ubuntu 1404 Server) to a sweet Synology DiskStation 414. I this post I will write about the migration process, about how I have migrated from a 10 TB LVM configuration to a 12 TB Raid5 configuration and how I have checked, using md5 hashes, if all files were copied without any error.

04 September, 2015

Setting up a 3G/4G modem with OpenWRT on the MPR-L8 or A5-V11


In my previous post, I have explained how to upload an OpenWRT image to the MPR-L8 or A5-V11, now we will go trough how to set it up for working as a mini 3G/4G router.

11 August, 2015

Root command line access for MPR-L8 / A5-V11 mini 3G routers


These small routers have a built in telnet service, which can be reached by telneting to the router with your favorite telnet client (e.g. Putty). The user name is admin and if you have not changed the password it is also admin.

06 August, 2015

Fixing modem detection problems on MPR-L8 or A5-V11 mini 3G routers

If you have one of these modems you may have encountered the problem, that on first try your USB 3G modem is working very well, and later it is not working at all. In this post I will explain a very easy trick, on how to fix this issue.


02 August, 2015

MPR-L8 (HAME MPR-A1) firmware update and firmware images

The MPR-L8 is very nice and cheap mini router, having also an USB port and a built in battery. From the factory it has a very capable firmware, providing support for 3G dongles for mobile internet sharing, media and file sharing from USB devices and compared to its very small size has all the filtering and port forwarding functions, that normal sized routers provide. Unfortunately the factory firmware is not very stable and we may want to add additional functionality like support for 4G modems or use it as an OpenVPN client to connect easily to home network from any location. All this is possible by flashing an OpenWRT firmware and setting it up according to our needs.

15 April, 2015

Some more pendrive speeds

Earlier I have measured the speed of some pendrives, now here is the next bunch. They are all 2.0 drives, in some cases the speeds are close to the limit of this interface.

12 April, 2015

Setting ethernet interface speed in /etc/network/interfaces

There is an easy way to set the network interface speed in Ubuntu 14.04:

In the iface section of the /etc/network/interfaces you can add the link-speed and link-duplex parameters, to pass them to ethtool.

The example below sets the link speed to 100 Mbit/sec:

iface eth1 inet static
        address 192.168.1.120
        netmask 255.255.255.0
        network 192.168.1.0
        link-speed 100
        link-duplex full


07 April, 2015

Samba "guest account" not working as expected

In a Samba installation I was trying to set up a Share, where any user without authetication is assigned to a certain Unix user, to have the propper rights ro read the content presented there.

After reading the Samba manual, the solution which came to my mind was to do the following setup:

guest only=yes
guest account=user

But this was not working and not globally readable files (which had permission for the user user) were not readables.

After reading a bit mode the manual, I found, that guest only is not enough it shoucl always be acompanied with guest ok.  I have tried this also, but still no lock.

After a lot of debunning and looking very stupidly, it come to my mind, that let's try to use the force user directive. I have constructed the following setup:

guest only = yes
guest ok = yes
force group = users
force user = user


and yes, this was working perfectly, the user's permissions were used in the filesystem.

Setting umask for a user in the GECOS field example

umask is a user related setting in Linux, which specifies, that when creating a new file or directory which permissions will be set.

For the shells users can set the umask with the umask command (what a surprice :-) or they can set the defult value using the same command in the shell init scripts.

But there are other programs (like Samba), which are using the umask and they are not taking into account the changes what users are making after they have logged in into the system.

To change the umask for them as the pam_umask manual says, you need to set the values in the GECOS fields.

But what is GECOS? You can find it in Wikipedia, that it is in the /etc/passwd file, but it may be more difficult to find an example for it. To put it short, the GECOS fields are the 5th element in the passwd file and the fields are separated by comas. In the following example we set the umask for the user test:

test:x:1003:100:Test user,umask=0002:/home/test:/bin/bash

Samba "force create mode"/"force directory mode" not working, how to solve?

I have created a Share on a Samba server, to be used commonly by several users, with the goal, that all users belonging to a Unix group (in this case "users") can read and write these files, but nobody else should have access to these files. Speaking in unix permissions I wanted to add the 0770 mask to these files.

After reading the Samba documentation I concluded that I need to set the "force create mode"/"force directory mode" parameters for this share and this should do the trick.

After setting it up it was working well for my account (the first, account created during installation), but it was not working for a second account, which I have created manually, and where I have added it manually to the users group as its primary group. For this account it always omitted the group write attribute for the directories, where the resulting permission was always 0750.

After some investigation it turned out that Samba was honoring the "umask" restrictions/settings which, in the case when the user is not in the primary group with the same name as the users,  is masking out the group write mask. (May be this is happening only when the "obey pam restrictions" is set to yes, but on Ubuntu 14.04 this is set by default.) Strangely enough this was happening to the directories only and not to the files (may be some inconsistecy in Samba implementation?).

The pam_umask manual page has a description on how umask is working and there are two solutions to the problem (changing the umask in the users startup scripts doesn't work, because it is not used by Samba):
  1. Either you set the primary group of all the affected users to the same name as their login name and add the relevant (in this case users) group as an additional group
  2. or you can change the umask for a user in their GECOS field
This GECOS field sound very good, but how to do it actually?

The GECOS fields are in /etc/passwd , it is in the 5th field of the user and you have to separate the  umask specification with a comma from the other GECOS fields. One example on how to use it is the following:

test:x:1003:100:Test user,umask=0002:/home/test:/bin/bash

Be aware that umask is just the negate of Samba force mode, in umask you have to set those bits to 1 which you want to be cleared.

06 January, 2015

Reinstalling preinstalled Windows 8 without Windows DVD


Probably this is nothing new, but I have spent almost one day to figure this out.

If you have a computer with preinstalled windows and want to do a clean install, the easies way is to go to http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media and create an installation USB pendrive.

This has the advantage, that you can create it with EFI secure boot, which is fast and secure.

Addition:
For Windows 7 you can use the following link: http://www.microsoft.com/en-us/software-recovery

04 January, 2015

Custom firware on the MPR-L8 cheap Wireless Router


This post is about experiences with hacking into the MPR-L8 and my attempts to install modified firmware to the router. At the end of the post there will be links to the simply uploadable OpenWrt firmware along with the original firmware to be able to restore the router.