Sunday, October 17, 2021

Manual Routing Metric Setting on Windows

https://serverfault.com/questions/238695/how-can-i-set-the-metric-of-a-manually-added-route-on-windows

I know this is late but I just ran into this today - I wanted to connect to gmail but it was blocked from the Domain LAN Web Filter. I brought in a wifi usb to get to the non-domain network and was able to get to gmail by changing the priority of the traffic. This still allowed me to access the domain network as well. To find out the interface #'s
Route Print
Use Netsh to set the lower value on the usb wifi device interface. The lower value means higher priority. This will remove the automatic setting as well.
netsh interface ipv4 set interface 25 metric=2
Use Route Print to verify If you make a mistake you can turn the interface back to automatic
netsh interface ipv4 set interface 25 metric=automatic
For more about netsh see http://www.colorconsole.de/cmd/en/Windows_Vista/netsh/interface/ipv4/set/interface.htm

Tuesday, May 11, 2021

Mapped Network Drive Failed

 Map Network drive with below error notification :

You can't access this shared folder because your organization's security policies block unauthenticated guest access.

as shown below :


Here is a simple remedy for it.
  • Open Registry Editor (Regedit)
  • Go to :  Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
    • Modify "AllowInsecureGuestAuth" value to "1"

    Close Registry Editor, and try again mapping your drive. 

    It should be working properly now.




    Friday, March 26, 2021

    How to delete the Recovery Partition in Windows 10

     Source : https://superuser.com/questions/1023765/how-to-delete-the-recovery-partition-in-windows-10

    https://www.diskinternals.com/partition-recovery/recovery-partition-and-how-to-delete-it/

    A recovery partition is a partition on the disk that helps to restore the factory settings of the OS (operating system) if there is some kind of system failure. This partition has no drive letter, and you can use only Help in Disk Management.

    As mentioned above, when a system is updated, a new recovery partition is created. This means the old recovery partition will be outdated. That means, that you better keep the current one and delete the old recovery partition.

    But which one is old and which one is current, you may ask?

    recovery partition in cmd

    For that, you will need to use the command line: right-click Start and select "Command Prompt (administrator)". In the window titled "cmd.exe", type the following command: "reagentc / info" and press Enter. In the Windows RE location line, you will get something like: "...\device\harddisk1\partition2\..." Now you need to recheck it with Diskpart; and with that tool, you can also delete it.

    To erase the disk recovery partition, you can use the built-in utility Diskpart.

    So, in the same Command Prompt window enter "diskpart". Then type "list disk":


    DISKPART> list disk DISKPART> select disk 4 Disk 4 is now the selected disk. DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 223 GB 1024 KB Partition 3 Recovery 450 MB 223 GB DISKPART> select partition 3 Partition 3 is now the selected partition. DISKPART> delete partition override DiskPart successfully deleted the selected partition. DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 223 GB 1024 KB


     

    Sunday, September 27, 2020

    5 Bahan Halal Pengganti Alkohol dalam Masakan

     Source : https://www.idntimes.com/food/dining-guide/putriana-cahya/5-bahan-halal-pengganti-alkohol-dalam-masakan-1/5

    1. Anggur merah

    Anggur merah atau red wine merupakan fermentasi buah anggur. Rasanya cenderung manis dengan aroma yang kuat. Nah, karena itu, jus buah anggur biasa juga bisa menjadi pengganti yang baik. Bisa juga menggunakan jus cranberry dalam olahan masakanmu.

    2. Anggur putih

    Minuman ini juga hasil fermentasi dari anggur, tapi jenis anggur hijau. Namun, bukan buah anggur tersebut yang bisa menggantikan kemiripan rasanya, melainkan campuran kaldu ayam atau sayuran dan jus apel segar.

    3. Rum

    Rum paling banyak dipakai dalam cake atau dessert, terutama black forest, tapi hidangan bersaus manis juga kerap memanfaatkannya. Tapi kalau kamu gak ingin memakai bahan beralkohol, bisa menggunakan sari apel dan ekstrak kacang almond sebagai penggantinya. Selain itu, sudah ada perisa dan aroma rum berbentuk pasta yang dijual bebas di toko kue yang tentunya bebas alkohol.

    4. Mirin atau sake Jepang

    Hasil fermentasi beras ini familiar banget digunakan untuk olahan sushi, ramen, dan makanan-makanan Jepang atau Korea. Namun, rasa yang mirip bisa didapat dari campuran perasan jeruk lemon, jus anggur, dan gula pasir.

    5. Ang ciu atau arak

    Fermentasi beras berwarna kemerahan ini jadi salah satu komposisi penting dalam berbagai masakan China. Terutama olahan seafood dan ayam untuk menghilangkan aroma amis dagingnya. Sebagai pengganti, kamu bisa membuat saus campuran dari kecap asin, irisan jahe, dan perasan jeruk nipis. Saus ini juga efektif menghilangkan bau amis, lho!


    Rosemary Garlic Butter Steak

    Source : https://vintagekitchennotes.com/rosemary-garlic-butter-steak-tips/

    Ingredients

    • 4 sirloin strip steaks, about 7-0z each (1 to 1.5-inches thick, room tº)
    • 2 or 3 garlic cloves
    • 2 Tbs  fresh rosemary leaves
    • 3 Tbs  butter
    • 1 Tbs  olive oil
    • Salt and pepper
    • A splash of white or red wine

    Instructions

    • Mince garlic and rosemary.
    • Add 1 teaspoon salt (or to taste) and mince it a little longer. You can also do this with a mortar and pestle.
    • Rub the paste over both sides of each steak.
    • Heat a skillet over medium/high heat and melt butter. Add oil to prevent it from burning too much.
    • Add steaks, season them with pepper and cook 1 or 2 minutes on each side.
    • Turn it over, cook it 2 or 3 more minutes and add the wine (you can add extra garlic and rosemary now too to the skillet). It will steam furiously.
    • Cook the steak 2 or 3 additional minutes for medium rare, remove steaks and let rest for 5 minutes.
    • Meanwhile, cook the wine until reduced and a kind of sauce if formed.
    • Slice the steaks and serve them with the sauce.

    Notes

    My tips for cooking the best steak:

    • Temperature: always have the meat at room temperature. That way it’ll be more tender. If it’s frozen, defrost it overnight in the fridge. The less change in temperature while defrosting, the better.
    • Salting: add salt right before it goes into the skillet. If you want to infuse some garlic and rosemary, rub them on the steaks, leave them at room tº for twenty minutes, and salt them at the last moment.
    • Thickness: a steak should be two or three fingers (1.5 to 2 inches) thick if you want it medium rare with a good crust.
    • Preheating: Make sure the skillet or steak iron griddle is preheated.
    • Searing: the steak must be first seared - cooking it quickly over very high heat to seal in the juices - on both sides over high heat, but finished over medium/low (unless you like it very rare inside, almost raw). Otherwise, it will become flushed, as we say here, which means the outside is too dark before the inside gets a chance to cook properly.
    • Resting: Always let it rest for 5 minutes after you remove it from the heat source. The juices go to the outer part of the meat piece while cooking, and resting redistributes them.
    • Doneness: Never pierce or cut a steak to check for doneness. To test them, lightly press them down with a fork or kitchen tongs. The more it gives, or the flabbier it feels, the rarer it's still is. When it's very cooked, the meat will hardly yield when you press it. I know many use a thermometer, and it's fine as long as the needle is thin.

    Thursday, August 08, 2019

    Resep Tempe Mendoan

    Pertama siapkan tempe berkualitas bagus. Umumnya yang dipakai tempe yang dibuat khusus buat mendoan, dibungkus daun dengan ukuran 20x15 cm. Atau bisa memakai tempe balok dan iris tipis seukuran 20x15 cm.

    Untuk adonan tepungnya, siapkan bumbu halusnya berupa 3 siung bawang putih, 5 butir bawang merah, 1/2 sdt ketumbar, 1 sdt garam dan 1/2 sdt merica. Campurkan bumbu halus ini dengan 100 g tepung beras, 100 g tepung terigu, aduk hingga rata. Tuangkan air secukupnya hingga menjadi adonan encer. Terakhir tambahkan 2 sdm daun bawang yang diiris halus. Jumlah bumbu disesuaikan dengan jumlah tempenya.

    Selanjutnya, celupkan irisan tempe ke dalam adonan tepung lalu goreng dalam minyak panas dan banyak. Jika tepung sudah beku mulai mengering, angkat segera dan tiriskan. Kalau tak suka rasa tepung yang kuat, biarkan beberapa menit hingga tepung sedikit kuning lalu angkat. Sebaiknya santap saat mendoan masih hangat. Siapkan sambal cocolannya berupa cabai eawit yang digerus kasar dengan bawang putih dan aduk dengan kecap manis.

    Source : https://food.detik.com/odilia-winneke/d-4657151/cara-bikin-tempe-mendoan-yang-gurih-enak?tag_from=wp_nhl_judul_4&_ga=2.135932787.334362717.1565236111-2066648975.1536239154

    Tuesday, January 08, 2019

    Turn off time grouping in PivotTables in Excel for Windows

    https://support.office.com/en-us/article/turn-off-time-grouping-in-pivottables-in-excel-for-windows-6be5afed-348c-4db2-9f87-5ac262d67b3f?ui=en-US&rs=en-US&ad=US

    To turn off time grouping on PivotTables (including data model PivotTables) and Pivot Charts, follow these instructions for adding a new DWORD (32-bit) Value registry key. The new key is: HKEY_CURRENT_USER > Software > Microsoft > Office > 16.0 > Excel > Options > DateAutoGroupingDisabled.

    Monday, December 17, 2018

    HP Proliant Microserver Gen10 Marvell BIOS RAID setup

    Hi, Its incredible how difficult HPE makes some easy things.
    I take 4h to find this solution.
    You enter Setup (F2) and change to legacy mode. Restart and Ctrl+M

    Accessing the Marvell BIOS Utility under legacy boot mode
    The UEFI boot mode is the server default boot mode. To switch to legacy boot mode, see Selecting the
    boot mode on page 64.
    Procedure
    1. Reboot the server.
    2. On the POST drive information screen, press Ctrl+M.

    Wednesday, October 31, 2018

    Windows 10 shared folder not accessible

    https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser

    Symptoms


    In Windows 10, version 1709, Windows Server version 1709, and Windows Server 2019, the SMB2 client no longer allows the following actions:
     
    • Guest account access to a remote server
    • Fallback to the Guest account after invalid credentials are provided
    SMBv2 has the following behavior in Windows 10, version 1709, Windows Server version 1709, and Windows Server 2019:
    • Windows 10 Enterprise and Windows 10 Education no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
    • Windows Server 2016 Datacenter and Standard edition no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
    • Windows 10 Home and Professional editions are unchanged from their previous default behavior.
    If you try to connect to devices that request credentials of a guest instead of appropriate authenticated principals, you may receive the following error message: 
     

    Cause


    This change in default behavior is by design and is recommended by Microsoft for security.
     
    A malicious computer that impersonates a legitimate file server could allow users to connect as guests without their knowledge. Microsoft recommends that you do not change this default setting. If a remote device is configured to use guest credentials, an administrator should disable guest access to that remote device and configure correct authentication and authorization.
     
    Windows and Windows Server have not enabled guest access or allowed remote users to connect as guest or anonymous users since Windows 2000. Only third-party remote devices might require guest access by default. Microsoft-provided operating systems do not.
     

    Resolution


    If you want to enable insecure guest access, you can configure the following Group Policy settings:
     
    Computer configuration\administrative templates\network\Lanman Workstation
    "Enable insecure guest logons"
     
    Note By enabling insecure guest logons, this setting reduces the security of Windows clients. 
     
    Example :
    
    Default Registry Value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:0 Configured Registry Value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:1

    More Information


    This setting has no effect on SMB1 behavior. SMB1 continues to use guest access and guest fallback.
     
    SMB1 is uninstalled by default in latest Windows 10 and Windows Server configurations. For more information see SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709.

    Monday, September 17, 2018

    mysql incorrect information in file corrupt error

    https://serverfault.com/questions/422507/mysql-incorrect-information-in-file-corrupt-error
    Incorrect information in file:    './cacti/poller_item.frm'
    
    .frm file stores the table format. Try this:
    • Stop MySQL
    • Take the backup of poller_item.frm, poller_item.MYD, poller_item.MYI
    • Drop the poller_item table
    • Start MySQL
    • Recreate poller_item table by using CREATE TABLE statement in cacti.sql (uses the corresponding version that you're running)
    • Stop MySQL
    • Copy the poller_item.MYD, poller_item.MYI into the datadir
    • Start MySQL again

    Monday, August 20, 2018

    string to array with IFS

    https://stackoverflow.com/questions/10586153/split-string-into-an-array-in-bash
    http://wiki.bash-hackers.org/commands/builtin/read


    IFS=', ' read -r -a array <<< "$string"
    Note that the characters in $IFS are treated individually as separators so that in this case fields may be separated by either a comma or a space rather than the sequence of the two characters. Interestingly though, empty fields aren't created when comma-space appears in the input because the space is treated specially.
    To access an individual element:
    echo "${array[0]}"
    To iterate over the elements:
    for element in "${array[@]}"
    do
        echo "$element"
    done
    To get both the index and the value:
    for index in "${!array[@]}"
    do
        echo "$index ${array[index]}"
    done
    The last example is useful because Bash arrays are sparse. In other words, you can delete an element or add an element and then the indices are not contiguous.
    unset "array[1]"
    array[42]=Earth
    To get the number of elements in an array:
    echo "${#array[@]}"
    As mentioned above, arrays can be sparse so you shouldn't use the length to get the last element. Here's how you can in Bash 4.2 and later:
    echo "${array[-1]}"
    in any version of Bash (from somewhere after 2.05b):
    echo "${array[@]: -1:1}"
    Larger negative offsets select farther from the end of the array. Note the space before the minus sign in the older form. It is required.

    There was a solution involving setting Internal_field_separator (IFS) to ;. I am not sure what happened with that answer, how do you reset IFS back to default?
    RE: IFS solution, I tried this and it works, I keep the old IFS and then restore it:
    IN="bla@some.com;john@home.com"
    
    OIFS=$IFS
    IFS=';'
    mails2=$IN
    for x in $mails2
    do
        echo "> [$x]"
    done
    
    IFS=$OIFS
    BTW, when I tried
    mails2=($IN)
    I only got the first string when printing it in loop, without brackets around $IN it works.

    Thursday, February 01, 2018

    Terminal Output Redirection into File

    https://askubuntu.com/questions/420981/how-do-i-save-terminal-output-to-a-file

    Tuesday, November 14, 2017

    Net Use Command for Windows

    The net use command is a Command Prompt command that's used to connect to, remove, and configure connections to shared resources, like mapped drives and network printers.
     The net use command is one of many net commands like net send, net time, net user, net view, etc. 

    Net Use Command Availability
    The net use command is available from within the Command Prompt in Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP, as well as in older versions of Windows and in Windows Server operating systems. Recovery Console, the offline repair utility in Windows XP, also includes the net use command but it's not possible to use it within the tool.
     Note: The availability of certain net use command switches and other net use command syntax may differ from operating system to operating system.

     Net Use Command Syntax
    net use [{devicename | *}] [\\computername\sharename[\volume] [{password | *}]] [/user:[domainname\]username] [/user:[dotteddomainname\]username] [/user:[username@dotteddomainname] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]

    List all active connection

    net use

    Remove temp credential login
    net use "\\10.158.252.100\xxx" /d

    https://www.lifewire.com/net-use-command-2618096

    Tuesday, November 07, 2017

    vsftpd server not listing ( 425 Failed to establish connection)

    Its kind of an off the wall solution but something I have run into on CentOS w/ vsftpd is problems with the ip_conntrack_ftp module not being loaded correctly causing this issue.

     Try this:
    modprobe ip_conntrack_ftp

    https://www.linuxquestions.org/questions/linux-server-73/vsftpd-server-not-listing-425-failed-to-establish-connection-4175414488/

    Saturday, October 28, 2017

    Argument list too long error for rm, cp, mv commands

    The reason this occurs is because bash actually expands the asterisk to every matching file, producing a very long command line. Try this:
    find . -name "*.pdf" -print0 | xargs -0 rm
    Warning: this is a recursive search and will find (and delete) files in subdirectories as well. Tack on -f to the rm command only if you are sure you don't want confirmation. If you're on Linux, you can do the following to make the command non-recursive:
    find . -maxdepth 1 -name "*.pdf" -print0 | xargs -0 rm
    Another option is to use find's -delete flag:
    find . -name "*.pdf" -delete
    Another possible solution :
    c=1; l=$(ls | wc -l); for i in *; do rm $i; echo "[$c / $l] $i"; c=$((c + 1));

    Friday, September 29, 2017

    IIS ftp server can't access from other machine

    https://serverfault.com/questions/438314/iis-ftp-server-works-locally-but-cannot-connect-from-remote

    Basically, you have to run:
    sc sidtype ftpsvc unrestricted
    
    And then restart the FTP service:
    net stop ftpsvc & net start ftpsvc
    
    From what I can tell, it's a bug in R2. Go figure.

    Monday, September 11, 2017

    How to know linux server restart

    You can use the following 2 commands (who & last) to find out the last time the system was rebooted and also messages about previous shutdown or runlevel changes.

    Last time system booted?

    For this you can use the who command. Specifically with the -b switch.
    $ who -b
             system boot  2013-08-01 17:56
    
    This says the last time the system was booted was 2013-08-01.

    Past reboots

    If you're interested in seeing a more extensive list of previous reboots you can use the lastcommand.
    $ last reboot | less
    reboot   system boot  2.6.35.14-106.fc Thu Aug  1 17:56 - 02:03 (7+08:06)   
    reboot   system boot  2.6.35.14-106.fc Thu Aug  1 09:41 - 17:55  (08:14)    
    reboot   system boot  2.6.35.14-106.fc Thu Jul 25 15:24 - 17:55 (7+02:31)   
    reboot   system boot  2.6.35.14-106.fc Thu Jul 18 18:05 - 15:23 (6+21:17)   
    ...
    

    Past system shutdowns & runlevel changes?

    You can use the last command for this too. You'll need to use the -x switch.
    $ last -x | less
    saml     pts/7        :pts/6:S.0       Sat Aug  3 21:30 - 21:30  (00:00)    
    saml     pts/6        :0.0             Sat Aug  3 21:29 - 21:30  (00:01)    
    saml     pts/4        :0.0             Fri Aug  2 21:49 - 22:16 (2+00:26)   
    saml     pts/2        :0.0             Fri Aug  2 13:30 - 22:16 (2+08:45)   
    saml     pts/1        :0.0             Fri Aug  2 13:05   still logged in   
    saml     pts/0        :0.0             Fri Aug  2 12:37   still logged in   
    saml     pts/0        :0.0             Fri Aug  2 12:35 - 12:37  (00:02)    
    saml     pts/0        :0.0             Thu Aug  1 17:58 - 12:35  (18:36)    
    saml     tty1         :0               Thu Aug  1 17:56   still logged in   
    runlevel (to lvl 5)   2.6.35.14-106.fc Thu Aug  1 17:56 - 02:04 (7+08:08)   
    reboot   system boot  2.6.35.14-106.fc Thu Aug  1 17:56 - 02:04 (7+08:08)   
    shutdown system down  2.6.35.14-106.fc Thu Aug  1 17:55 - 17:56  (00:00)    
    runlevel (to lvl 6)   2.6.35.14-106.fc Thu Aug  1 17:55 - 17:55  (00:00)    
    saml     tty2                          Thu Aug  1 17:54 - down   (00:01)    
    root     tty2                          Thu Aug  1 17:53 - 17:54  (00:00)    
    ...
    

    References