Skip to main content

Posts

User account Lock/Unlock / Disable and enable

User account Lock/Unlock / Disable and enable Ex - Username - testing Lock command =---------- passwd -l testing or usermod -L testing unlock command ================= passwd -u testing or usermod -U testing Disable and Enable ==================== The following will lock an account Code: passwd -l testing You could also change the users shell to /bin/false if you don't want them to log in Code: usermod -s /bin/false testing Enable the account usermod -s /bin/bash tesing

Linux Delete Symbolic Link ( Softlink )

Delete Symbolic Link File Use the following syntax:   rm linkname unlink linkname Cd to /tmp cd /tmp ln -s /etc/resolv.conf dns ls -l dns Outputs: lrwxrwxrwx 1 vivek vivek 16 2009-08-16 04:28 dns -> /etc/resolv.conf Now delete dns symbolic link:   rm dns OR unlink dns Delete Symbolic Link Directory Use the following syntax:   rm linkDirName unlink linkDirName Note: Avoid appending / at the end of linkDirName. Cd to /tmp: cd /tmp ln -s /etc test ls -l test Sample Output: lrwxrwxrwx 1 vivek vivek 4 2009-08-16 04:31 test -> /etc Now delete test symbolic link directory:   rm test OR unlink test

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

ssh-keygen  creates the public and private keys.  ssh-copy-id  copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys. This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent. Step 1: Create public and private keys using ssh-key-gen on local-host jsmith@local-host$ [Note: You are on local-host here] jsmith@local-host$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/jsmith/.ssh/id_rsa): [Enter key] Enter passphrase (empty for no passphrase): [Press enter key] Enter same passphrase again: [Pess enter key] Your identification has been saved in /home/jsmith/.ssh/id_rsa. Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub. The key fingerprint is: 33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 jsmith@local-host Step 2: Co...

Change your Hostname without Rebooting in RedHat Linux

cd /etc/sysconfig vi network Look for the HOSTNAME line and replace it with the new hostname you want to use. In this example I want to replace localhost with redhat9. HOSTNAME=redhat9 When you are done, save your changes and exit vi. Next we will edit the /etc/hosts file and set the new hostname. vi /etc/hosts In hosts, edit the line that has the old hostname and replace it with your new one. 192.168.1.110 redhat9 Save your changes and exit vi. The changes to /etc/hosts and /etc/sysconfig/network are necessary to make your changes persistent (in the event of an unscheduled reboot). Now we use the hostname program to change the hostname that is currently set. hostname redhat9 And run it again without any parameters to see if the hostname changed. hostname Finally we will restart the network to apply...

Add a New Hard Disk Without Rebooting Guest

A rescan can be issued by typing the following command: echo "- - -" > /sys/class/scsi_host/ host# /scan fdisk -l tail -f /var/log/message Replace host# with actual value such as host0. You can find scsi_host value using the following command: # ls /sys/class/scsi_host Output: host0 Now type the following to send a rescan request: echo "- - -" > /sys/class/scsi_host/ host0 /scan fdisk -l tail -f /var/log/message How Do I Delete a Single Device Called /dev/sdc? In addition to re-scanning the entire bus, a specific device can be added or existing device deleted using the following command: # echo 1 > /sys/block/ devName /device/delete # echo 1 > /sys/block/ sdc /device/delete How Do I Add a Single Device Called /dev/sdc? To add a single device explicitly, use the following syntax: # echo "scsi add-single-device <H> <B> <T> <L>" > /proc/scsi/scsi Where, <H> : Host <B> : Bus (Cha...

How can you create mount points in solaris?

Steps: ======= 1, Take the Basic System information and Reboot the system to recognize the new LUN 2, After the Rebooting the system check for new LUN or run qlreconfig command and devfsadm  # /opt/QLogic_Corporation/drvutil/qla2300/qlreconfig  -d qla2300 3, Once the new Disk comes under OS control label the disk using format menu 4, Check the disk visible in veritas control as invalid 5, Bring the disk into veritas control  # vxdctl enable 6, Verify the new LUN information as Online in veritas ( In this stage it shows online invalid )  # vxdisk -o alldgs list 7, Initialize the new LUNs in Veritas control  # /etc/vx/bin/vxdisksetup -i c2t20d114 format=cdsdisk  8, Again verify the New LUN information in Veritas ( Now it shows as online status )  # vxdisk -o alldgs list FOR Example: BDMRP database 9, Create new DG called bdmrpdg using new LUN (206GB)  # vxdg init bdmrpdg bdmrpdg_01=c2t20d11...

Speak on new girl

Goals and ambitions. Her thoughts. Her opinions on life, love, and god. Does she read? What does she do for fun? Any hobbies? is she family oriented? what type of music does she like? what does she do for fun? is she adventurous? ask about her past. Does she like animals? what movies does she like? does she have any phobias? what does she hate? Does she want kids? Favorite colors? what does she want to be when she grows up? and ask why she thinks what she does. hope this helps!!