Posts

Showing posts from April, 2017

How to fix Google Drive app hangs at "one moment please..."

I was trying to install google drive app on my Windows server 2012 R2 and after I entered all the login information, the app hang up at "one moment please..." which is forever. So here is a fix:

Open Control PanelGo to Network and InternetGo to Internet OptionsOpen Security TabClick Trusted sitesClick the "site" buttonCopy & paste https://accounts.google.com to "Add this website to the zone" and click Add button Try to login again to Google Drive app and everything will be ok.

Fix slack's icon tray missing in Ubuntu 17.04

After upgrading my computer to Ubuntu 17.04, the Slack's icon try gone missing. Here is a quick fix:

1. Edit /usr/share/applications/slack.desktop, and change the following line:

Exec=/usr/binslack --disable-gpu %U

to

Exec=env XDG_CURRENT_DESKTOP=Unity /usr/bin/slack --disable-gpu %U

2. Restart slack to see the icon tray appears

Add SSH key to Vyatta for SSH authentication

I was trying to set up unattend ssh login for vyatta user by concatenate my computer's public key to /home/vyatta/.ssh/authorized_keys but every time the server gets restarted, the key's gone. I shouldn't do it that way because Vyatta has its own way of managing ssh keys. Do this instead:

1. From my computer, copy the public key to vyatta server:

$ rsync -arv ~/.ssh/id_rsa.pub vyatta@vyatta:/home/vyatta

(at this point, I have to enter the password for vyatta user)

2. On Vyatta, using Vyatta's commands to import the key:

$ configure
$ loadkey vyatta /home/vyatta/id_rsa.pub

From now I don't have to enter password to ssh to Vyatta.

Apt-get update error in VyOS-1.1.6 (Debian 6.0.10 - Squeeze)

I's trying to install some packages on my VyOS (1.1.6 image) and got 404 errors with "apt-get update":

Err http://ftp.us.debian.org squeeze/main Sources  404  Not Found [IP: 128.30.2.26 80]Err http://ftp.us.debian.org squeeze/contrib Sources  404  Not Found [IP: 128.30.2.26 80]Err http://ftp.us.debian.org squeeze/non-free Sources  404  Not Found [IP: 128.30.2.26 80]Err http://ftp.us.debian.org squeeze/main amd64 Packages  404  Not Found [IP: 128.30.2.26 80]Err http://ftp.us.debian.org squeeze/contrib amd64 Packages  404  Not Found [IP: 128.30.2.26 80]Err http://ftp.us.debian.org squeeze/non-free amd64 Packages  404  Not Found [IP: 128.30.2.26 80]W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/main/source/Sources.gz  404  Not Found [IP: 128.30.2.26 80]
W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/contrib/source/Sources.gz  404  Not Found [IP: 128.30.2.26 80]
W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/non-free/source/…

How to fix "/usr/local/lib/libldap_r-2.4.so.2: no version information available" error

When I ran "sudo apt update" this morning these errors showed up:

/usr/lib/apt/methods/https: /usr/local/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.s
o.4)
/usr/lib/apt/methods/https: /usr/local/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.
4)

This error means libcurl was compiled with a version of libldap_r other than what I have in /usr/local/lib. So a work around is to symlink the missing files:

sudo ln -fs /usr/lib/liblber-2.4.so.2 /usr/local/lib/ 
sudo ln -fs /usr/lib/libldap_r-2.4.so.2 /usr/local/lib/

LDAP authentication (and groups mapping) with Active Directory that works in Tiki Wiki 16.2

Image
To make the LDAP authentication with MS Active  Directory works in Tiki Wiki 16.2, I have to do the set up both in LDAP and LDAP external groups tabs.

1. In Settings > Control Panels > Log in




2. In General Preferences tab:


Authentication method section, select Tiki and LDAPUncheck Forgot passwordUncheck Users can change their password   click Apply

3. In LDAP tab, set up as following (you may need to switch the Advanced mode on to see more settings):
LDAPIf user does not exist in Tiki: Create the userUncheck Create user if not in LDAP Check Use Tiki authentication for Admin login LDAP Bind settingsHost: ldap://<my-ldap-server-address>Port: 389Write LDAP debug Information in Tiki Logs: <checked>LDAP Bind Type: Active Directory (username@domain)Search scope: SubtreeLDAP version: 3Base DN: DC=MYDOMAIN,DC=COMLDAP UserUser DN: OU=All Users(If you want to pull users from a specific OU, if not, leave blank, also remember to omit the Base DN part)User attribute: sAMAccountNameUse…

LDAP authentication error in Tiki Wiki 16.2

Image
I just deployed a Tiki Wiki 16.2 instance on a Ubuntu 14.04 server. And then I was trying to add the LDAP authentication to it but the user got redirected to a blank page or error one saying that it could not be handled. It turns out that there is a bug in the PEAR module.

Luckily, I could fix the bug by editing vendor_extra/pear/PEAR.php, renamed the following functions:

function __construct($error_class = null) -> function PEAR($error_class = null)

function __construct($message = 'unknown error', $code = null, -> function PEAR_Error($message = 'unknown error', $code = null,


Remember, this is just a workaround. The fix was added in the daily build.


"So You Don't Get Lost in the Neighbourhood"

Image
In an early morning in January 2017, I was standing outside a makeup shop waiting for my girlfriend. I was surprised by the fact that the shop is my childhood's friend's house. The make up lady is her mother.

The lady told me about how her daughter's life's going with a warm voice that makes everyone comfortable. In that moment, I felt the time flies very fast... It's just like Yesterday, the last day I saw my friend. We're just little kids sharing food to each other and keep laughing about silly things. I'd never come to her house because at that point in time, I was a little bit shy. That day on January, I visited her place accidentally the first time but her mother said that she went abroad several years ago with her husband to settle a new life.

I've visited the neighborhood so many times in my life but that was the first time I saw something. The thing that I missed so many times. Was it my friend or was it my childhood or was it the image of myse…