In Linux, we use passwd to change password, but passwd requires input from stdin to get the new password. It is common case that we may want to change the password non-interactively, such as creating new user accounts and change or set password for these accounts on a number of Linux boxes when the new
Read more
Tag: Password
How to Enable root on Ubuntu
Posted onFor UNIX users/developers, having the power of the user 0 (root’s UID) on our hands is essential. It also allows us to have complete control over the system. And one more thing we all have in common is that we hate Windows. Thus, we set out in search of an operating system for our own
Read more
Effective Anti-Spam in WordPress with Plugins
Posted onWordPress has a very rich set of plugins and a combination of them can make anti-spam in WordPress quite easy. Here is a list of plugins that can help prevent spammers from registering spam account (if the site allows registration of new users) and posting spam comments. Anti spam comments Use the Akismet WordPress plugin.
Read more
Proxy using SSH Tunnel on Windows
Posted onThis article is an instruction of how to use https://www.systutorials.com/proxy-using-ssh-tunnel/ on a Windows machine. The mechanism is similar as the one in https://www.systutorials.com/proxy-using-ssh-tunnel/ with “Proxy listening to localhost port only”. Download PuTTY PuTTY is the software we use here for port forwarding. Please download it following the links in https://www.systutorials.com/open-source-and-portable-ssh-scp-sftp-and-vnc-clients-for-windows-to-remote-control-linux/. Configure PuTTY and create a
Read more
How to install no-ip client on Linux
Posted onnoip2 is a dynamic update client for No-IP to keep your current IP address synchronized with your No-IP domain, no matter whether the IP is dynamically requested via DHCP or static assigned. Furthermore, with the domain name, we can host site using a “static” domain whose CNAME points to the No-IP domain. noip2 is a
Read more
Setting Up POP3/IMAP Email Box on Nokia E71
Posted onThe software in Nokia E71 already support POP3 and IMAP email box. But we may lead to install Nokia messaging and setting up account of Nokia messaging. Storing our emails in remote servers isn’t a secure way. And why not use IMAP directly if it is supported by the system software? How to set up
Read more
How to Connect to MySQL in JSP
Posted onWe use tomcat as the container used for instructions in the post. 1) Download the driver mysql-connector-java-*.*.*-bin.jar and put it into WEB-INF/lib/, and remember to restart tomcat. 2) The example code as follows. String driverName=”com.mysql.jdbc.Driver”; String userName=”username”; String userPasswd=”password”; String dbName=”dbname”; String tableName=”tablename”; String url=”jdbc:mysql://localhost/”+dbName+”?user=”+userName+”&password=”+userPasswd; Class.forName(“com.mysql.jdbc.Driver”).newInstance(); Connection conn=DriverManager.getConnection(url); Statement statement = conn.createStatement(); String sql=”SELECT *
Read more
Script: Running Commands on a List of Servers
Posted onI frequently run some commands/scripts on a batch of servers whose IPs are already collected in a file. I usually use a simple loop and call the ssh to run these commands remotely and automatically. This operation, however, is common and can be abstracted into a separate script. Here is the script that I come
Read more
How to SSH to Linux Hosts for Beginners
Posted onThis is a simple tutorial for beginners to SSH to a Linux host. This is quite easy with the easy-to-use software freely available but the beginners need a tutorials to start with. Hence, I write this tutorial about how to ssh to a Linux host. This tutorial is for users on Windows. 1. Download a
Read more
How to Get System Uptime on Linux and Windows OSes
Posted onHow to find out Linux and Windows uptime is introduced in this post. Linux uptime Linux uptime can be easily found out by the uptime command: $ uptime 22:19:29 up 10 days, 22:26, 5 users, load average: 0.00, 0.00, 0.00 The system is up for 10 days, 22 hours and 26 minutes. uptime gives a
Read more
Jailbreaking Apple iPod Touch with Spirit in Linux
Posted onHow to jailbreak Apple iPod touch in Linux will be introduced in this article. We use Spirit to jailbreak iPod touch. Spirit[1] is an untethered jailbreak for iPad, iPhone, and iPod touch on certain firmware versions. Please read [1] for requirement when using Spirit. Currently, the version of iTunes used should be iTune 9 earlier
Read more
How to Set Up Password-less SSH Login on Linux
Posted onAutomatic passwrod-less ssh login can make our life easier. To enable this, we have 2 options: using key-based authentication by copying our SSH public keys to the remote machines for automatic password-less login or using password-based authentication. I will introduce the 2 options in the post. Before you start, please note that key-based authentication is
Read more
Sending Email Using mailx/s-nail in Linux Through Gmail SMTP
Posted onThe heirloom mailx (or s-nail if you are using Ubuntu 18 or later or similar releases) command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. Gmail is great. Now, how to use gmail’s smtp in mailx/mail? gmail is a little special since gmail’s
Read more
Automatically Backing Up Xen File-backed DomU
Posted onA script for backing up file-backed Xen DomU is introduced in this post. This script can be changed to similar platform. In our cluster, virtual machines are stored under /lhome/xen/. Virtual machine with id vmid is stored in directory vmvmid. The raw image disk file name can also be derived from vmid. Some more details
Read more
How to Remote Control Linux Server Using VNC through SSH Tunnel
Posted onSometimes we need to have the GUI of some application on the remote server. ssh’s X11 forwarding with “-X” parameter is a good and fast method. But if we want to have a whole desktop environment, vnc is a good choice. In this post, the method of how to control remote server using vnc through
Read more
Configure sMobileNet of HKUST on Linux
Posted onHow to configure NetworkManager to connect to sMobileNet in HKUST is introduced in this post. The wireless network connection configuration for sMobileNet in NetworkManager The SSID is “sMobileNet” Wireless security is “WPA & WPA2 Enterprise” Authentication is “Protected EAP (PEAP)” Anonymous identity is “” (empty) CA certificate is “(None)” (there will be a warning appear,
Read more
Hadoop Installation Tutorial (Hadoop 1.x)
Posted onUpdate: If you are new to Hadoop and trying to install one. Please check the newer version: Hadoop Installation Tutorial (Hadoop 2.x). Hadoop mainly consists of two parts: Hadoop MapReduce and HDFS. Hadoop MapReduce is a programming model and software framework for writing applications, which is an open-source variant of MapReduce that is initially designed
Read more
Setting Up a Git Server Using Gitosis
Posted onUpdate: Since gitosis is not maintained and supported, please check out gitolite for setting up a new git server. (see the comment from Sitaram Chamarty, the gitolite author, the author of gitolite.) Gitosis is a piece of software writen by Tommi Virtanen for hosting git repositories. It manages multiple repositories under the same user account.
Read more