Skip to main content

Posts

Showing posts from 2014

How to reset the evaluation period for Windows Server 2008

How to manually extend the evaluation period When the initial 60-day evaluation period nears its end, you can run the Slmgr.vbs script to reset the evaluation period. To do this, follow these steps: Click Start , and then click Command Prompt . Type slmgr.vbs -dli , and then press ENTER to check the current status of your evaluation period. To reset the evaluation period, type slmgr.vbs –rearm , and then press ENTER. Restart the computer. This resets the evaluation period to 60 days. You can see the current status of the trial period by entering slmgr /dlv Other Links on the topic http://www.daniel-mitchell.com/blog/reset-windows-7-rearm-count/ http://www.arabek.net/how-to-rearm-windows-7-instance/ Other References talk about skipping the rearm For Windows Vista: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SL For Windows 7: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform Change value of Skip

Testing Connections to Other computers

PowerShell 4 has a handy feature called Test-Connection  More info at http://technet.microsoft.com/en-us/library/hh849808.aspx You can also invoke powershell commands on a remote computer using a command like invoke-command -ComputerName 192.168.2.192 -ScriptBlock { get-wmiobject win32_process | select caption  | where {$_.caption -eq "firefox.exe" } } -credential Administrator However, before that command will work in a none domain environment, you'll need to set up some trusts. Got this from http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/ Run on all computers in the party... Set-Item wsman:\localhost\client\trustedhosts 192.168.2.111 Then you'll need to run  Restart-Service WinRM You may also have to run  Enable-PSRemoting -Force  

Great article on setting Office 365 passwords using powershell.

http://o365info.com/manage-office-365-users-password-using/ Notice the use of $_. to refer to columns in a CSV file  Set a Predefined Password for Office 365 user PowerShell command Syntax Set-MsolUserPassword –UserPrincipalName <UserPrincipalName> –NewPassword <New Password> -ForceChangePassword $False Set a Predefined Password for Office 365 users imported from a CSV File Step 1: Get-MsolUser | Select UserPrincipalName|Export-CSV C:\Temp\o365users.csv Step 2: Import-CSV C:\Temp\o365users.csv |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword AbcAs123 -ForceChangePassword $False} Creating a new user and password from a CSV file Import-CSV –Path C:\Temp\users.csv| ForEach-Object { New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.FirstName -LastName $_.LastName  -DisplayName "$($_.FirstName) $($_.LastName)" –Password $_.Password –UsageLocation “AU” }

Permanently Change hostname in linux

Permanent hostname change on RedHat based systems RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit I got this from http://www.ducea.com/2006/08/07/how-to-change-the-hostname-of-a-linux-system/

Setting your own time server (or perhaps pool.ntp.org) in Windows

http://www.timetoolsglobal.com/2013/06/21/how-to-synchronize-microsoft-windows-to-a-ntp-server-1/ Single Command for Windows servers, to use NTP w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org After that, the trick is to tell the windows server that the time configuration has changed, this is done with w32tm /config /update Finally, tell the time service to update w32tm /resync   The following command will tell you where the server is getting it's time from  w32tm /query /source

Determining if Linux is 64 or 32 bit

Recently, I had to find out if my linux was 32 or 64 bit. Turns out that x86_64 is 64 bit. $uname -a  produced... Linux yyy.xxx.local 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_6 4 GNU/Linux $file /sbin/init produced... /sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped $ arch i686 $ uname -m i686

Using digest authentication is easy with apache

All you need to do is stick something like this in httpd.conf... <Location /> AuthType Digest AuthName " Secure Stuff " AuthDigestDomain / AuthDigestProvider file AuthUserFile /var/www/auth/.digest_pw Require valid-user </Location> and then type ... htdigest -c /var/www/auth/.digest_pw ' Secure Stuff ' admin in the above, admin of course is the user.  Where I've typed "Secure Stuff" needs to equal each other  the -c option with htdigest will create a new file and overwrite any other users you have created With AuthDigestDomain, you can specify multiple locations covered by the same auth.   everything underneath is covered automatically  You can include relative URI's or absolute URI (inc domain)  apache gives the example,  AuthDigestDomain  URI  [ URI ] ... or  AuthDigestDomain /private/ http://mirror.my.dom/private2/ 

Reverse Mapping failed for SSHD

http://www.electrictoolbox.com/reverse-mapping-possible-break-in-ssh/ See snippet below... Connecting from the command line, you might enter something like this: 1 ssh   my.example.com and get some output like this: 1 Connecting to my.example.com... 2 reverse mapping checking getaddrinfo for 192-168-1-243.foo.bar.net failed - POSSIBLE BREAK-IN ATTEMPT! 3 chris@my.example.com's password: What this is telling us is that although we are connecting to my.example.com the IP address of the server we are connecting to actually maps back to 192-168-1-243.foo.bar.net in this example. When this actually happened to me, it's because the reverse DNS had not been set up for the server (which would map e.g. 192.168.1.243 to my.example.com as well as vice versa). Hosts file solution Because I knew this reverse mapping was OK, I can add an entry to my hosts file and it will stop the error message from happening. For the above example, I would add the fo

Migrating a Vm from Workstation to ESXI

I had a problem with a migrated vm not knowing that it's network card details had changed a bit: here seems to be the key steps Go into  /etc/udev/rules.d  and delete the  70-persistent-net.rules  file and DO NOT reboot. Go into  /etc/sysconfig/network-scripts/ifcfg-eth0  and manually update to the MAC of your new NIC card.  I found that removing almost everything in the  ifcfg-eth0  file was necessary Reboot and the network should come alive.   The important bits seem to be  DEVICE="eth0" ONBOOT="yes" IPADDR=" x.x.x.x " NETMASK=" x.x.x.x " GATEWAY=" x.x.x.x "

Interesting article on how windows treats primary and secondary dns

Although the article says it's for Windows XP, it's still appears valid for Windows 7. However, on my own Windows 7 i noticed that ServerPriorityTimeLimit was already set to 0 http://support.microsoft.com/kb/320760/en-us If you are using Windows XP, the DNS Client service may not revert to using the first server in the DNS server list.   . By default, the server priorities are reset every 15 minutes To work around this behavior, modify the registry so that the DNS server that is configured first is tried first on each query. Follow these steps, and then quit Registry Editor: Click  Start , click  Run , type  regedit , and then click  OK . Locate and then click the following key in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters On the  Edit  menu, point to  New , and then click  REG_DWORD . Type  ServerPriorityTimeLimit , and then press ENTER. On the  Edit  menu, click  Modify . Type  0 , and then  click OK . When y

problems moving VM's from workstation to esxi

With CentOS 6 everthing is handled by udev now. Go into /etc/udev/rules.d and delete the 70-persistent-net.rules Now you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 and manually strip the file of anything that could break it - dont delete this file though.  Just keep the eth0, IP address restarting the network service does nothing, it seems that udev needs to restart , so restart the machine Is there another to restart udev ?

Powering on a VM from the esxi command line

ESXi 5.x My virtual machines where not automatically starting up in the free ESXi 5.0.0 update 1 I put a command into /etc/rc.local  to start them and it worked fine However, this behaviour was fixed in ESXi 5.1.0 update 2 and it now includes a rc.local.d directory  To power on a virtual machine from the command line: List the inventory ID of the virtual machine with the command: vim-cmd vmsvc/getallvms |grep <vm name> Note : The first column of the output shows the vmid. Check the power state of the virtual machine with the command: vim-cmd vmsvc/power.getstate <vmid> Power-on the virtual machine with the command: vim-cmd vmsvc/power.on <vmid>

Using Centos 7

Just started using Centos 7 There was this guide at http://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp showing how to install apache, mysql and php.  I laughed, I thought, who would need that ! Turns out I did need it - so much has changed

Difference between Maya and 3ds

From http://www.tomshardware.com/forum/247220-49-maya I am a newb to 3D Graphics, and I wanted to know about the main difference between the Industry Leading Autodesk's Maya and 3DS Max. I know both are now from Adobe and used for 3D Designing and modelling. First off, neither of those programs are Adobe products and, as you said, are Autodesk. Just making sure that you're clear so that you don't go searching with "Adobe" as a keyword. Second, functionally, both programs are essentially the same. They do the same things, but in different ways. Choosing between them is really more a matter of personal preference and, more subtly, desired profession. Being the industry leader, Autodesk products are uses the world over. Regardless of which app you choose, 3ds or Maya, you'll find a job.  3ds tends to skew toward the game industry, but that's mostly because the it got into so many studios back in the DOS days. However, you WILL find game jobs if you ch

Verifying that DNS forwarders in bind where actually being called

I was setting up bind and wanted to verify that DNS forwarding was working the way I wanted it to I found tcpdump essential, really helpful The following was a snippet from http://support.citrix.com/article/CTX124727 A packet capture on the BIND server shows the query being forwarded to the Global Forwarders defined in the zone configuration file:  rosa pri # tcpdump -n udp port 53 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 22:36:39.530000 IP 10.12.17.30.1215 > 10.12.17.4.53: 365+ A? www.citrix.com. (32) 22:36:39.530000 IP 10.12.17.4.40722 > 10.9.3.22.53: 57464+% [1au] A? www.citrix.com. (43) 22:36:39.530000 IP 10.9.3.22.53 > 10.12.17.4.40722: 57464* 1/0/1 A 66.165.176.15 (59) 22:36:39.530000 IP 10.12.17.4.53 > 10.12.17.30.1215: 365 1/0/0 A 66.165.176.15 (48)

Apache gets sendmail permission denied in selinux

From http://www.simplemachines.org/community/index.php?topic=446074.0 Hi everyone,   when installing SMF 2.0 on RHEL6 recently, I found that emails were not being sent, with the error Code: [Select] sendmail: fatal: chdir /var/spool/postfix: Permission denied showing up in /var/log/httpd/error_log.  This was caused by the apache user not having SELinux permission to send email. This could also occur on other distributions which use SELinux (particularly Fedora and CentOS, but possibly others as well), if it is set to "Enforcing". You can check this by using Code: [Select] /usr/sbin/getsebool httpd_can_sendmail which will report Code: [Select] httpd_can_sendmail --> {on|off} and if it is off, you can turn it on using Code: [Select] sudo setsebool -P httpd_can_sendmail 1 with the "-P" for persistent (across reboots). Important note, it can look like it's doing nothing, but it actually is. It will come back in about 1 minute

Wiring a 240V socket

There are 3 pins The Active Pin:  Red or Brown The Neutral Pin:   Black or Blue The Earth: Green or Green and Yellow The new standard effectively uses Brown and Blue for cords and Red and Black for the building See also www.accesscomms.com.au/reference/powerplug.htm The Australian mains plug configuration was originally presented as provisional standard C112 in 1937, formalised as Standard C112 in 1938, redesignated AS3112 in 1981 and harmonized with the New Zealand standard and redesignated AS/NZS3112 in 1993.  Australian Standards AS/NZS 3112:2000 and AS/NZS3112:2004 for Australian Mains Plugs now define the requirements for the insulation  of the Active and Neutral pins of the plug.