Posts

Showing posts from March, 2009

creating bulk users in linux

Today I have configured NX server. Now, Next task is to create users and really its very time consuming and boring task. Usually you use useradd command to create a new user or update default new user information from command line. So i have explore Linux and searched on Google , I have found few scripts to do this. But later I have found one good and easy solution. Here is that, Update and create new users in bulk. newusers command reads a file of user name and clear-text password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file. This command is intended to be used in a large system environment where many accounts are updated at a single time (batch mode). Since username and passwords are stored in clear text format make sure only root can read/write the file. Use chmod command: # touch /root/bulk-user-add.txt # chmod 0600 /root/bulk-user-add.txt Create a user list as follows. Op

Boot time parameters of Linux kernel

Boot time parameters you should know about the Linux kernel. The Linux kernel accepts boot time parameters as it starts to boot system. This is used to inform kernel about various hardware parameter. The kernel command line syntax name=value1,value2,value3… Where, * name : Keyword name, for example, init, ro, boot etc Common Boot time parameters init This sets the initial command to be executed by the kernel. Default is to use /sbin/init, which is the parent of all processes. To boot system without password pass /bin/bash or /bin/sh as argument to init init=/bin/bash single The most common argument that is passed to the init process is the word 'single' which instructs init to boot the computer in single user mode, and not launch all the usual daemons root=/dev/device This argument tells the kernel what device (hard disk, floppy disk) to be used as the root filesystem while booting. For example following boot parameter use /dev/sda1 as the root file system: root=/dev/sda1 I

MYSQL REPLICATION & DISASTER RECOVERY

Image
MySQL’s built-in replication capability is the foundation for building large, high performance applications on top of MySQL. Replication lets you configure one or more servers as slaves, or replicas, of another server. 1. Setting up Replication: Three threads are involved in Replication: One on the master and two on the slave. • The I/O thread on the slave connects to the master and requests the binary update log. The Binary log dump thread on the master sends the binary update log to the slave on request. • Once on the slave, the I/O thread reads the data sent by the master and copies it to the relay log in the data directory. • The third thread, also on the slave, is the SQL Thread, which read and executes the queries from the relay log to bring the slave in alignment with the master. 2. Replication with example: Version: Both master and slave should be the same version. Otherwise replication will be improper. Network Configuration Settings Master Server IP Address: 10.5.1.10 Slave S