vClock 1.1 Published!

vClock App IconMy curiously let me found out some bugs in the app. I was looking on the statistic and found that there are Android phone using language Turkish and Swedish downloaded and installed my app. I therefore tried out setting my app to those languages and found some bugs… T_T Anyway bugs fixed.

Below is a change log in version 1.1:

! Fixed a bug in displaying incorrect 12/24 hour format on preview widget when 24 hour format is used
! Fixed a bug in not showing correct date separator according to language settings
! Fixed a bug in displaying incorrect 12/24 hour format when changing system language

Advertisements

Set up Samba without using Deprecated “share” Security Setting

I was trying to set up Samba file sharing in the office. It works somehow but there are two things I don’t quite happy about.

  1. The setting I tried uses the “share” as the security setting which is deprecated.
  2. When the user click on a password protected folder, the user name is pre-filled in Windows XP and is grey out, not allowing to change.

After searching in the Internet more deeply I found this post which solved my problems.

Below are the summary of what I have done.

Objective

  1. Set up Samba file sharing
  2. Allow no-login listing of shared resources (That is, able to access \\192.168.1.1 without entering any password)
  3. Allow no-login access of specified resources
  4. Allow login access of restricted resources
  5. Avoid the use of the deprecated “share” security setting

Procedure

Edit 2013-06-18: While I was trying to answer a comment from the reader on this post, I went thought the Samba documentation and tried on my new Raspberry Pi (at the time I wrote this article I was setting up Samba on Red Hat 5). I found out that a file and some options are actually not necessary and therefore I have strike through those parts in this update.

  1. In /etc/samba/smbusers, editing the file with the present of the following line. This create a user name mapping between SMB user name (guest) and Linux user name (nobody).
    nobody = guest
  2. In the [global] section of /etc/smb.conf, do the following
    1. Set the security to user, by including the line security = user
    2. Set on invalid user login information, map the login to SMB guest account, by including the line Map to guest = Bad User
    3. Make sure the previous SMB to Linux user name mapping is in effect by including the line username map = /etc/samba/smbusers
    4. Allow no-login user to list shared resources by including guest ok = yes to the resources you want to be public
  3. For each shared resources, add a section in /etc/smb.conf. If it is password protected, remember to include the line valid users = authenticated_user under the section.

Sample smb.conf

[global]
    workgroup = workgroup
    server string = MY-SERVER
    security = user
    passdb backend = tdbsam
    cups options = raw
    map to guest = Bad User
    username map = /etc/samba/smbusers
    guest ok = yes

[tom_password_protected_folder]
    path = /share/tom
    writeable = yes
    valid users = tom

[no_password_folder]
    path = /share/nobody
    writeable = yes

Reference

Delete Saved Password for Network Drive, Microsoft Outlook, XP Mode, etc, in Windows

Windows and Microsoft actually saved the password in OS which can be accessed in Windows. To access the page, just simply run the below command:

control keymgr.dll

Accessing Key Manager

If you are using Windows 7 (and probably Windows Vista as well), you can also access the page by going to the user account page and clicking the “Manage your credentials” link.

Manage your Credentials Link

Mapping Public IP Address to Another Server

Situation

Server A: Using internal IP A

Server B: Using internal IP B

Public IP A: Mapped to internal IP A, accessing Server A resource

Public IP B: Mapped to internal IP B, accessing Server B resource

Goal

Server A: Using internal IP C

Server B: Using internal IP B and A

Public IP A: Mapped to internal IP A, accessing Server B resource

Public IP B: Mapped to internal IP B, accessing Server B resource

Problem

Under the above goal configuration, configured with the help of this article, accessing public IP A cannot access Server B resource.

Solution

On Server B, instead of restarting the network service once using command service network restart, restart it twice by execute the same command once more. This will immediately allow access of Server B resource from Public IP A.

Good yum Repository for Red Hat Enterprise Linux

The official Red Hat yum repository does not provide the latest version of often used software. In particular, the MySQL database is still version 5.0 whereas it is already 5.5 in the official MySQL database.

Certainly you can download the RPM from the MySQL official website and do your own installation. That’s what I did, but the problems comes when I need to install the php-mysql package on my server.

So I searched in the Internet, and finally found a post here. It directly me to a yum repository with plenty of updated packages.

Instruction

  1. Download and install the EPEL (Extra Packages for Enterprise Linux), from http://fedoraproject.org/wiki/EPEL
  2. Download and install the REMI, from http://rpms.famillecollet.com/
  3. Enable the REMI repository, by changing the enable flag from 0 to 1 in configuration file /etc/yum.repos.d/

That’s it! Now you can try perform yum search to find our package =D