# get the current IP address from the internet
/tool fetch mode=http address="checkip.dynu.com" src-path="/"
dst-path="/dynu.checkip.html"
:local result [/file get dynu.checkip.html contents]
# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local currentIP [:pick $result $startLoc $resultLen]
:global ddnsuser your_Dynu_username
:global ddnspass "your_Dynu_password"
:global ddnshost "your_Dynu_hostname"
:global ipddns [:resolve $ddnshost];
#:global ipddns
:if ($ipddns != $currentIP) do={
:log info ("DynuDDNS: IP-Dynu = $ipddns")
:log info ("DynuDDNS: IP-Fresh = $currentIP")
:log info "DynuDDNS: Update IP needed, Sending UPDATE...!"
:global str "/nic/update?hostname=$ddnshost&myip=$currentIP"
:log info "currentIP is $currentIP"
/tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass
dst-path=("/Dynu.".$ddnshost)
:delay 1
:global str [/file find name="Dynu.$ddnshost"];
/file remove $str
:global ipddns $currentIP
:log info "DynuDDNS: IP updated to $currentIP!"
} else={
:log info "DynuDDNS: No change needed";
}
/system script
add name=Dynu
policy=read,write,test
source=":global ddnsuser your_Dynu_username
:global ddnspass "your_Dynu_password"
:global theinterface "WAN_Interface_Name"
:global ddnshost "your_Dynu_hostname"
:global ipddns [:resolve $ddnshost];
:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]
:if ([ :typeof $ipfresh ] = nil ) do={
:log info ("DynuDDNS: No IP address on $theinterface .")
} else={
:for i from=( [:len $ipfresh] - 1) to=0 do={
:if ( [:pick $ipfresh $i] = "/") do={
:set ipfresh [:pick $ipfresh 0 $i];
}
}
:if ($ipddns != $ipfresh) do={
:log info ("DynuDDNS: IP-Dynu = $ipddns")
:log info ("DynuDDNS: IP-Fresh = $ipfresh")
:log info "DynuDDNS: Update IP needed, Sending UPDATE...!"
:global str "/nic/update?hostname=$ddnshost&myip=$ipfresh"
/tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass dst-path=("/Dynu.".$ddnshost)
:delay 1
:global str [/file find name="Dynu.$ddnshost"];
/file remove $str
:global ipddns $ipfresh
:log info "DynuDDNS: IP updated to $ipfresh!"
} else={
:log info "DynuDDNS: dont need changes";
} }"
/system scheduler add comment="Update Dynu DDNS" interval=5m name=ddns_sheduller \
on-event="/system script run Dynu\r\n" policy=read,write,test start-time=startup
///////////////work
# get the current IP address from the internet
/tool fetch mode=http address="checkip.dynu.com" src-path="/" dst-path="/dynu.checkip.html"
:local result [/file get dynu.checkip.html contents]
# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local currentIP [:pick $result $startLoc $resultLen]
:global ddnsuser "user"
:global ddnspass "pass"
:global ddnshost "host"
:global ipddns [:resolve $ddnshost];
#:global ipddns
:if ($ipddns != $currentIP) do={
:log info ("DynuDDNS: IP-Dynu = $ipddns")
:log info ("DynuDDNS: IP-Fresh = $currentIP")
:log info "DynuDDNS: Update IP needed, Sending UPDATE...!"
:global str "/nic/update?hostname=$ddnshost&myip=$currentIP"
:log info "currentIP is $currentIP"
/tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass dst-path=("/Dynu.".$ddnshost)
:delay 1
:global str [/file find name="Dynu.$ddnshost"];
/file remove $str
:global ipddns $currentIP
:log info "DynuDDNS: IP updated to $currentIP!"
} else={
:log info "DynuDDNS: No change needed";
}
วันจันทร์ที่ 3 ธันวาคม พ.ศ. 2561
วันอาทิตย์ที่ 2 ธันวาคม พ.ศ. 2561
change backup Vestacp
nano /usr/local/vesta/data/users/admin/user.conf
แก้ admin เป็น user แล้ว หา backup = 3 เปลี่ยน เป็น 1
วันพฤหัสบดีที่ 8 พฤศจิกายน พ.ศ. 2561
NewHost php 7 config
PHP7
nano /etc/php/7.0/apache2/php.ini
date.timezone = "Asia/Bangkok"
max_execution_time = 3600
max_input_time = 360
max_input_vars = 2000
memory_limit = 1024M
Backup
nano /usr/local/vesta/data/users/admin/user.conf
แก้ admin เป็น user แล้ว หา backup = 3 เปลี่ยน เป็น 1
LDAP
extension=php_ldap.dll
apt-get install php7.0-ldap (or use apt-get install php7.1-ldap )
service apache2 restart
cd /home/admin/conf/web
nano apache2.conf
+nano sapache2.conf
php_admin_value open_basedir none
php_admin_value upload_tmp_dir none
nano /etc/php/7.0/apache2/php.ini
date.timezone = "Asia/Bangkok"
max_execution_time = 3600
max_input_time = 360
max_input_vars = 2000
memory_limit = 1024M
Backup
nano /usr/local/vesta/data/users/admin/user.conf
แก้ admin เป็น user แล้ว หา backup = 3 เปลี่ยน เป็น 1
LDAP
extension=php_ldap.dll
apt-get install php7.0-ldap (or use apt-get install php7.1-ldap )
service apache2 restart
cd /home/admin/conf/web
nano apache2.conf
+nano sapache2.conf
php_admin_value open_basedir none
php_admin_value upload_tmp_dir none
วันจันทร์ที่ 5 พฤศจิกายน พ.ศ. 2561
Enabling SSH screenly Raspbeery
Enabling SSH
If you have installed via a newer NOOBS Installer SSH is disabled by default. To Enable it:
- Connect via the Console (
CTRL + ALT + F1
) - Login using the default user name and password (
pi
'raspberry`) - Execute
sudo raspi-config
- Select
Interfacing Options
- Navigate to and select
SSH
- Choose
Yes
- Select
Ok
- Choose
Finish
You should now be able to SSH into the Pi
It is highly recommended that you change the default password if you intend to connect your Pi to the outside world.
วันพุธที่ 17 ตุลาคม พ.ศ. 2561
How to Reset vCenter SSO password for the VCSA appliance
How to Reset
vCenter SSO password for the VCSA appliance
To reset the
vCenter SSO password, You need to remember the root credentials of the PSC
or vCenter Server Appliance.
1.Login to
Platform Services Controller or vCenter Server with Embedded Platform Services
Controller Appliance using SSH as root user
2. Run this
command to enable access the Bash shell:
shell.set --enabled true
3.Type shell and
press Enter. Enter the below command
/usr/lib/vmware-vmdir/bin/vdcadmintool
4. Press 3 to
choose the Reset Password option. When prompted for the Account UPN,
enter User@vSphere_Domain_Name.local
In my case, it is administrator@vsphere.local.
In my case, it is administrator@vsphere.local.
If your vSphere
Domain name is customized, provide the customized domain name. A random
password will be generated for the VCenter SSO admin account.
5. Log in to
vSphere Web Client using the vCenter SSO admin account with the generated
password. Select the Change Password option under the logged
in Username
vcenter 6.0 reset password
Enable SSH on vCenter Server Appliance 6 (VCSA)
If you’re running the Appliance version of vCenter 6 at some stage you may want console access via SSH. When you install VCSA 6 for the first time you have the option during installation to enable SSH. Depending on your security stance you may have left SSH off and now you want it on.
There are a few different methods for enabling SSH on VCSA. The below two methods both use the web client.
Method 1.
Directly enabling SSH in the Web Client.
Directly enabling SSH in the Web Client.
This method is probably the easiest and quickest way. The settings just happen to be in a non-intuitive location.
On the Home screen of the Web Client select Administration -> System Configuration
Select Nodes and right click on your vCenter server.
Select Edit Settings
Select the Checkbox Enable SSH login
Click OK.
You should now be able to SSH to the vCenter name or IP.
Method 2.
Enabling SSH via the Remote Console.
Enabling SSH via the Remote Console.
Navigate to your vCenter Appliance VM. Click on Launch Remote Console.
Press ALT + F1 to get a login TTY session and login as root
Run the below commands to enable SSH. ssh.get shows the current status. ssh.set allows you to change the state of SSH. Use ‘false’ instead of true to disable SSH.
Command> ssh.get
Enabled: False
Command> ssh.set --enabled true
Command> ssh.get
Enabled: True
Command>
The above methods takes effect immediately, no need to reboot. When disabling SSH, current sessions stay active and don’t end. So if someone has an open SSH session they won’t be kicked out until they logoff or their session times out.
วันจันทร์ที่ 6 สิงหาคม พ.ศ. 2561
XIAoMi VOLTE
enable Volte Chack
*#*#86583#*#*
enable
*#*#4636#*#*
Eanable vowifi
*#*#869434#*#*
Testmenu
*#*#4636#*#*
*#*#86583#*#*
enable
*#*#4636#*#*
Eanable vowifi
*#*#869434#*#*
Testmenu
*#*#4636#*#*
วันศุกร์ที่ 20 กรกฎาคม พ.ศ. 2561
How to Reset Your Surface Using USB Recovery Drive
How to Reset Your Surface Using USB Recovery Drive
In this article, we will walk you step-by-step through how to create a USB recovery drive, loading recovery image, and resetting your Surface using the USB recovery drive.
Microsoft Surface lineup made an easy for users to recover their devices in case something went wrong by included a recovery partition on every model. However, in case you can’t reset your Surface with existing recovery partition, you can use a USB recovery drive instead.
To create a recovery drive, you will need to download recovery image for your from Microsoft Support website. To learn more how to download a right recovery image for your Surface device, please check this article How to download official recovery image for Microsoft Surface.
1 How to Create USB Recovery Drive
Before you can your USB drive as a USB recovery drive, you will need to use a built-in tool called “Create a recovery drive” to prepare your USB drive ready for booting. To do so.
Important All USB recovery drives must be formatted to FAT32 prior to loading a recovery image. For Surface RT and Surface 2, you will need at least 8 GB USB drive, while other models required at least 16GB USB drive for loading the image.
- Connect your USB drive to your Surface.
- Go to Start and type recovery. Select “Create a recovery drive”.
- Make sure you uncheck the “Backup system files to the recovery drive” option and click Next.
- Select your USB drive, and click Next.
- Click Create.
- It will take a few minutes to finish creating a recovery drive, after finish click Finish.
- Now you will see your USB recovery drive labeled as “RECOVERY” in File Explorer.
2 Copying Recovery Image Files to Your USB Recovery Drive
After you finish creating a Recovery Drive, you will need to copy your Surface’s recovery image content to the drive by:
Note If you don’t have the recovery image for your Surface yet, please check out our guide on how to download official recovery image for Microsoft Surface here.
- Open “File Explorer”.
- Open your downloaded Surface Recovery Image with the extension “.zip” with File Explorer.
- Select all items and drag them to the newly created USB recovery drive.
- You will need to confirm to replace the files in destination.
- Now your USB recovery drive is ready to use to reset a Surface to its factory settings.
3 Resetting a Surface Using a USB Recovery Drive
After you created a USB recovery drive with all recovery image files, now you can use it to recover your Surface to its factory settings. To do so:
- Shut down your Surface.
- Connect your USB recovery drive to the Surface that you want to reset.
- Press and hold the Volume Down button on your Surface, then press and release the Power button.
- When you see the Surface logo screen appear, release the Volume Down button.
- If you do it right, you will see the language options below, select your preferred language.
- Select a keyboard layout.
- Select Troubleshoot.
- Select Recover from a drive
- Select Fully clean the drive, if you want your Surface to have everything like its factory settings including hard drive partition layout.
- Click Recover to confirm recovering.
- Now your Surface will reboot and start recovering process.
- After finishing recovering your Surface, it will ask you to clear information stored on the TPM chip. Press F12 if you have type cover attached, otherwise press Volume Up button to confirm erasing.
- After it finishes clearing the TPM and it will reboot and take you to set up your Windows.
สมัครสมาชิก:
บทความ (Atom)