Thursday, August 29, 2019

Windows 7 Set Password for Guest Account

Set a password for the Guest Account

These following steps assumes that you are the computer administrator, or know the admin password:
  • Open the start menu, type "cmd" in the search field, and you'll see a "cmd.exe" icon at the top. (If you type "command", you'll see an icon labeled "Command Prompt" - both are ok).
  • Right-click on the cmd.exe / Command Prompt icon, and choose "Run as administrator" from the context menu - this gives you the "elevated privileges" you need for the rest.

  • When the command line prompt window opens, you have several choices:

    • To enable password protection, and add a default password of "password" for the Guest Account, type "net user guest password" in the prompt window. Hit Enter to apply.

    • To enable password protection for the Guest Account, and let Windows 7 set a random password, type "net user guest password /RANDOM" at the prompt. Hit Enter, and write down the mix of letters, numbers, and symbols of the 8-character, auto-generated password.

    • To add a password for the Guest Account and lets you choose it, type "net user guest *" at the prompt, and hit Enter; then, type your password at the prompt, hit Enter, and re-type that same password it once more for confirmation - hit Enter to proceed:
  • You have successfully added password protection to the Guest Account on your Windows 7 computer; you can now double-check simply by typing "user" in the start menu, and clicking on "User accounts": click on "Manage another account", and you'll see that the words "Password protected" have been added below the "Guest - Guest Account" icon / button.
Source : https://tweaks.com/windows/37388/applying-a-password-to-the-guest-account/

Monday, August 19, 2019

Linux - Search File 2G + Compress Entire Folder

Search File 2G
root@jupiter # find -H -P /mnt/data -size +2G

Compress an Entire Directory or a Single File

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

Tuesday, August 13, 2019

Linux Hard Disk Format Command

Step #1 : Partition the new disk using fdisk command

Following command will list all detected hard disks: # fdisk -l | grep '^Disk'
Output:

Disk /dev/sda: 251.0 GB, 251000193024 bytes
Disk /dev/sdb: 251.0 GB, 251000193024 bytes
A device name refers to the entire hard disk. For more information see Linux partition naming convention and IDE drive mappings.
To partition the disk – /dev/sdb, enter:
# fdisk /dev/sdb
The basic fdisk commands you need are:

  • m – print help
  • p – print the partition table
  • n – create a new partition
  • d – delete a partition
  • q – quit without saving changes
  • w – write the new partition table and exit

Step#2 : Format the new disk using mkfs.ext3 command

To format Linux partitions using ext2fs on the new disk: # mkfs.ext3 /dev/sdb1

Step#3 : Mount the new disk using mount command

First create a mount point /disk1 and use mount command to mount /dev/sdb1, enter: # mkdir /disk1
# mount /dev/sdb1 /disk1
# df -H

Step#4 : Update /etc/fstab file

Open /etc/fstab file, enter: # vi /etc/fstab
Append as follows:

/dev/sdb1               /disk1           ext3    defaults        1 2
Save and close the file.

Source : https://www.cyberciti.biz/faq/linux-disk-format/

Monday, August 12, 2019

SQL : Update table from another table

UPDATE TBL_PO_D
   SET TBL_PO_D.NOSPB = TBL_PO_H.NoSPB
   FROM TBL_PO_H
 WHERE TBL_PO_D.NoPO=TBL_PO_H.NoPO
GO