I recently saw this TechRepublic article about 10 mistakes new Windows Administrators make... I think that sometimes even the most experienced administrators need to be reminded about these:
- Trying to change everything all at once.
- Overestimating the technical expertise of end users.
- Underestimating the technical expertise of end users.
- Not turning on auditing.
- Not keeping systems updated.
- Getting sloppy about security.
- Not documenting changes and fixes.
- Failing to test backups.
- Over-promising and under-delivering.
- Being afraid to ask for help.
I maintain a server that runs multiple WordPress instalations on the same server. It’s necessary to update these installations regularly as WordPress is constantly releasing new updates all the time. Manual updating takes too much time, so I decided to write some shell scripts to automate the update process.
My script assumes that the document root of all WordPress installations on that server is at /www/DOMAINNAME/.
1. Download the WordPress source code:
cd ~
rm -Rf wordpress*
wget http://wordpress.org/latest.zip
unzip wordpress*.zip
2. Make a backup of each site before the upgrade, copy the new version, then restore the sitemap file.
for domain in domain1.com domain2.com domain3.com
do
rm -Rf /www/backup/$domain
cp -a /www/$domain /www/backup/$domain
cp -Rf --reply=yes ~/wordpress/* /www/$domain/
cp /www/backup/$domain/sitemap.xml /www/$domain/
chown -R --reference=/www/$domain /www/$domain/
find /www/$domain -type f -exec chmod 664 {} \;
done
This has save me a lot of time updating the server that I maintain.
If you are executing an external program in your NANT script and want to have a bit more control over when a task is considered a success or failure, this post should help.
First thing you need to do is add the 'failonerror="false"' attribute to the exec task. This will ensure that the task won't fail if the external program fails...
Next you need to capture the value returned from the program being executed. This is done with the 'resultproperty='
Finally, you can then specify the conditions of failure. This is achieved with the '
The following is an example from one of my NANT build script:
<exec program="${osql.exe}"
commandline="${osql.Param} "${change.script}""
resultproperty="execReturnCode"
failonerror ="false"/>
<fail if="${execReturnCode == '1'}">EXEC failed (return code 1)This will ensure that the build script will only fail if a result of '1' is returned from the program. This way you can refine what you consider to be a failure, rather than using the default fail conditions. You could also modify this slightly to execute follow-up task based on the specific code returned.
I use Filezilla in Portable App format for all of my FTPS (FTP Over SSL) and SFTP ("FTP" over SSH) needs. I love the program and I am glad that such excellent work is available for free. This project is a prime example of how open-source does not necessarily mean poor-quality. However, I have found out that it can suffer from the same stupid mistakes that propriety products make.
I recently upgraded from 3.0.11.1 to 3.1.5. After the upgrade, I started having problems with FTPS sites.I use FTPS to connect to several Unix servers running vsftpd and proftpd and a mainframe running Z/OS. I did not have any problems with SFTP sites. The Filezilla client would connect to an FTPS site but would immediately disconnect after login and as it was attempting to retrieve the file listing of the site.
I did some investigation and it appears that the developers behind Filezilla have become purist, and arrogant, in their latest version. The problem is caused by the remote site not sending the client a proper shutdown notice for data connections as "required" by RFC4217. I put "required" in quotes because I've read several places that this is one interpretation of the RFC since the RFC states that the implementation may choose to close the transport but is not required to close the transport if it does not receive the close notice. I have not read the RFC myself so I can not comment on either interpretation...
I can suggest that a better course of action would have been to "warn" the user that the remote site is not following RFC4217, and that some future version would treat it as an error and disconnect. I just read a forum post response of what appears to be one of Filezilla's Forum Site Administrators basically saying, "Too bad. We're right and everyone else is wrong."
My hope is that the community will discuss this and the developers will "back" off their strict interpretation of this RFC. Already this problem has been fixed in vsftpd 2.0.7 and proftpd 1.3.2rc2 but it will take time for these versions to replace existing installations. I have not heard if and when this will be fixed in Z/OS on the mainframe that I deal with...
In my research, I have found no evidence of security problems because the remote server does not shut down the TLS connection properly and I still think that using FTPS with the shutdown problem is better than using no FTPS at all. Combine that with the fact that I can't force owners of the remote Unix/mainframe systems to upgrade their software, means that I'll stick to the 3.0.11.1 version of Filezilla Portable for the foreseeable future. Unfortunate for me, that means that any other fixes/feature from the 3.1.x versions are unavailable to me even if they are security related... :(
I do a lot of .Net development and I've recently ran into an issue after switching to Vista with my programs. I use log4net as my application logging solution and when I run my programs on Vista, I get the following:
log4net:ERROR [UdpAppender] Unable to send logging event to remote host fe80::582c:7c39:4197:e34%10 on port 8080.
System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used
at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remote EP)
at System.Net.Sockets.UdpClient.Send(Byte[] dgram, Int32 bytes, IPEndPoint endPoint)
at log4net.Appender.UdpAppender.Append(LoggingEvent loggingEvent)
It appears that there is are issues in net 2.0 with IPv6 interfering with the parsing of the remoteAddress but the bug fix appear not to work. You could disable IPv6 or try to recompile the library yourself with correct compiler directives but it is easier to use another address than 127.0.0.1 as loop-back address to workaround the defect. I use 127.0.0.2 like suggested here and then everything works fine.
<appender name="UdpAppender"
type="log4net.Appender.UdpAppender">
<param name="RemoteAddress"
value="127.0.0.2" />
<param name="RemotePort"
value="8080" />
<layout type="log4net.Layout.XmlLayoutSchemaLog4j, log4net">
<locationInfo value="true" />
</layout>
</appender>
I've added three more albums (246 Pictures). The first album is pictures from one of two best friend's birthday party. It was nice to get together with his family and see everyone again. The next album is one of my very close friend's Wedding. He was married on the beach in a very small ceremony. This was the first "Beach Wedding" I've attended and it was nicely done. (Congratulations and Welcome Bruce...) The third album was a visit to the local fire station as part of a school field trip. My children got to see a Fireman fully dress and climb into a fire engine and ambulance. They had a lot of fun.
I've gotten somewhat behind on posting pictures to the web site. Grandparents and friends have poke and probed without success to get me to upload new pictures...until today! I have finally uploaded some new pictures after 11 months of not adding any pictures. As of now, I've added nine new photo albums containing 648 new images. Even better, that only covers the first four months of 2008! I still have quite a few more albums to add before I'm caught up.
Recently, I had to replace a older server with a new server. The old server was running Windows 2000 Server. The new server was Windows 2003. I was tasked to migrate a batch job from the old server to the new server. At first, this seemed like it would be an easy task, but after recreating the scheduled job to run the .BAT file, I kept getting an error message about "Unable to start: Access Denied". It turns out that Microsoft changed the permissions on CMD.EXE as part of their Security Initiatives to make it more secure. One option was to add the account into the administrators group but we didn't want to give the application user account that much privilege so I looked for a different solution.
I determined that if I granted Read and Execute access to the application account for CMD.EXE, then the scheduled job would run without problems. Here are the instructions to enable the account to run the batch job:
- Click Start, and then click Windows Explorer.
- Locate and then right-click the CMD.EXE file. The CMD.EXE file is located in the %WINDIR%\System32 folder.
- Click Properties.
- Click the Security tab.
- Click Add.
- In the Enter the object names to select box, type the user name that the batch job runs under, and then click OK two times. Note that when you add the user, the user is automatically granted Read and Execute permissions on CMD.EXE.
- Click Yes when you are prompted to continue.
When coding, be careful if you need to perform DateTime calculations (add/subtract) on values representing time zones that practice daylight savings time. Unexpected calculation errors can result. Instead, convert the local time value to universal time, perform the calculation, and convert back to achieve maximum accuracy.
DateTime d;
d = DateTime.Parse("Oct 26, 2003 12:00:00AM"); //date assignment
d = d.ToUniversalTime().AddHours(3.0).ToLocalTime();
// d contains 10/26/2003 02:00:00 AM - Correct!
MessageBox.Show(d.ToString());
Working with DateTime structs seems to be simple, but it's not. Make sure you are aware of pitfalls described in the article Coding Best Practices Using DateTime in the .NET Framework.
I ran into a problem today trying to get a python-based SVN pre-commit hook to run. The first time I ran it with no commit message, it correctly reported back an error... However, when I entered a commit message greater than 10 characters, it still reported an error. I did some investigation and it appears that the output from the child process gets lost and not returned to the python script. I modified the script to use the subprocess module but found that when the script runs with the SVN commit process, it fails with a "The handle is invalid" error message. It turns outs that this is a bug in Python 2.5. The fix (for now) is to define and close stdin and stderr before reading the stdout... This script is tested on Windows XP and Windows 2003 Server.
#!D:\Python25\python.exe |
From Ilknur:
Amanda and Kimberly are 3 years old now. We had a birthday party last sunday and they were so happy. They got lots of presents. Well, since I came back from Turkey, it's almost four months. They are very big and smart two beautiful young ladies now. They do speak and understand whatever we say. They go to preschool two days a week and gym class once a week. They both love to be there with their friends. They paint, cut, glued the papers, make some small projects at school. We have whole big box of those projects. There are paintings, hats, tree, animals and many other stuff in the box. We still go to the big playground when the weather is good. They love being there. They also love play with sand which is in sand box on the deck. Well the most important thing must be that we have been working on potty training since one week. They are doing really good job and learning fast. It will take some time but they both have already have many stickers from using potty. We also started to have "story time" before going to take a nap everyday for half an hour. It makes them calm down and sleepy :) As you see, I have been here for four months and every other day, they do something new which impressed me a lot. I love my little sisters.
Big Sister, Ilknur xoxoxoxo
You want your Ubuntu desktop to be more responsive? It will take less than a half hour to perform all these tweaks. These tweaks will make your system faster and more responsive without a doubt. Read on to perform the tweaks and enjoy your faster system.
From what I understand these tweaks will work with all forms of Linux. They are not Ubunutu Specific. I have only tried them on Ubuntu though, so if you use them on other Linux Distro's you do at your own risk.
It's been a good year and the girls continue to grow. It has been a very busy holiday season this year and we look forward to things calming down before the Girl's third birthday in April. For Halloween, the girls decided to be Elmo. We took them out to Trick-or-Treat around the neighborhood this year. For Thanksgiving, we visited each of the grandparents. The girls enjoyed seeing the grandparents and their cousin Angel. Then came the "Mad-Dash" to the end of the year during December. We got a tree, decorated it, and put presents under it. During the month of December is the girls' cousin Avie's Birthday, then there is Caroline's Dad's Birthday. Then Christmas arrives. After that, Mary's Birthday, My Dad's Birthday, then My Birthday comes and goes. In addition to the Holiday Albums, I've posted a "2.5 Years" album that cover the girls for the past 6 months. Please enjoy the pictures and post any comments you want to about the pictures.
I recently installed VMWare Server on Windows 2003 x64 OS. Normally once I get the OS installed, I don't usually hang out at the console and do all of my adminstration via RDP. It turns out that if you are trying to create a VM on this OS via RDP, you'll get an error message "The handle is invalid". You can work around this issue by connecting to the "Console" session via RDP using the command: "mstsc /console". I hope that VMWare will fix this problem in the next version of the Server. Other than this little glitch, very good product....
I used to watch a show called "The ScreenSavers" on an obscure channel called ZDTV... Then that network became TechTV but the shows remained the same, geeks teaching geeks. When I found out that Comcast had purchased TechTV, I was happy that more people would be able to watch the shows that I had come to love. However, when Comcast merged G4, their gaming network, with TechTV, I knew that nothing good was going to come of this merger.
Next thing you know, all of the TechTV staff is gone and the programming left on the channel is complete garbage... It's good to know that Leo, Patrick, and Kevin Rose have continued their talent via podcasts, netcasts, and IPTV shows.
BTW, let everyone remind Kevin to, "Grow up!" Stop trying to be a drunken slob that can't get through an episode without making yourself look bad... When Kevin does the technical stuff, such as Systm, he is actually pretty good.
Anyway, nothing will bring me more joy than the day that G4 dies. Die G4! Die!
Just uploaded two new photo albums. The first one is from a trip we took to Gettysburg, PA during September. The other album is from the recent Marriott Associate Appreciation Picnic at the Marriott Ranch in Hume, VA. There were hay rides and pony rides. The girls had a lot of fun at the picnic. When we left the Picnic around 6 PM, The girls went to sleep and didn't wake up until the next day. Enjoy!
Had a need to calculate the day of the year today in Microsoft Excel. I thought that this would have been a built-in function of Excel. It turns out that it is not! I found this function to convert a Date stored in an Excel spreadsheet to the day of year:
=E8-(DATE(YEAR(E8),1,1)-1)You still need to format the cell as a number because Excel will try to format the number as a Date Format. Be sure to replace E8 with the cell that contains the date you are looking for...
Currently (as of Version 1.0.0) VMWare Server does not include a pre-built kernel module for vmware-tools package so you must compile your own module from the source code. Luckly, Ubuntu makes that an easy. To instal vmware-tools, you'll need to install a few packages before compiling:
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install make g++
After you have installed those packages and clicked on the "Install VMWare Tools..." menu option in the VMWare Server Console:
cd /tmp
tar zxf /media/cdrom/VMwareTools-1.0.0-28343.tar.gz
cd vmware-tools-distrib
./vmware-install.pl --default
Once you have done that, you can reboot the system to have the VMWare tools load.
I don't really like the way that "RedHat" Linux has destroyed itself, so I'm looking for new Linux distribution. A friend of mine showed me Ubuntu Linux a while back and I thought that it might make for a really good desktop alternative to Windows. Ubuntu recently released 6.06 LTS version which includes a "server" version. I must admit, it pretty cool to boot the installation and be prompted to install a LAMP installation from the CD... However, as I was afraid of, Ubuntu just isn't quite ready for the "server" yet. Case in point, I do a lot of developing and testing in virtual environments. I started up my VMWare Workstation and installed Ubuntu 6.06.1 LTS Server. When I rebooted, the virtual machine hung at Uncompressing Linux... After searching on Google, it turns out that the only current solution is to use the Install CD to boot into Rescue Mode and then "execute a shell in /dev/discs/disco/part1". At the prompt, I had to install the 686 "Desktop" Kernel by typing
sudo apt-get install linux-686. Since the server kernel didn't wasn't doing me any good, I removed in by typing
sudo apt-get remove linux-server. I rebooted the virtual machine then. To my amazement, the system came up fast! I'm not sure what I lost by switching to the 686 desktop kernel but in my opinion, this is what is really holding Linux back. For now, I'll continue to evaluate Ubuntu as my new server platform.
To get a Command Prompt running as the LocalSystem Account, Create a service by typing the following:
The space after the "=" is important so don't forget to type that too. You have just created a new service that will launch a command prompt when you start the service. From this command prompt you can launch other programs and these programs will also run as the LocalSystem Account. This is good for testing services when you develop them...sc create LocalSystemCMDSvc binpath= "cmd /K start" type= own type= interact
Even if you are logged in as Administrator, you're not getting Adminstrator rights. There's a way to turn this "feature" off:
- Run gpEdit.msc
- Navigate to: Computer Configuration | Windows Settings |
Security Settings | Local Policies | Security Options - Change "User Account Control: Run all users including Administrators as standard users" to "Disable"
- Change "User Account Control: Behavior of the elevation prompt" to "No Prompt"
- Log Off and log back
It is hard to believe that the girls are almost 2 Year Old. They light up when I walk into the room. Each morning when I leave to go to work, they wave and say Bye. In the evenling, They climb up on the chair with me to watch television.
From Ilknur:
My little sisters are 22 months old now. I really can't believe how they grow up so fast. They both are reallyu smart and energetic. They know and understand what's going on around them. They are trying to say whatever we say or whatever they hear. Kimber just said my name... I'm really glad that I've heard it from both before I leave. We are going to the gym every tuesday morning. They are getting more social. Kimberly found out a new favorite word "come here." She's saying that lots of times in a day and it's really cute. Amanda used to be shy girl, but not anymore. She is so outgoing when she meets someone for the first time or when we go out. They love to watch "Dora the Explorer" as always. Last couple of days, we have had such a fun time in the snow. They loved to play in the snow. These days we are having our last days. And we are enjoying our list times.
'Till next month.....
With each new build I keep looking this information up so I decided to record it here.
1. Insert the Windows Vista CD in the CD-ROM drive.
2. Power on the virtual machine to start installing Windows Vista.
3. If using a blank hard disk: When the Windows Vista installer menu appears, choose the first option, Install Now.
4. Press Shift-F10 to open a command prompt.
5. Start the disk partitioning utility.
diskpart
6. Enter the following commands to partition the hard disk:
select disk 0
create partition primary
7. When the partitioning process is complete, click the Reset button to reboot the virtual machine.
From my older "daughter" (Ilknur):
My little sisters are twenty-one months now. They learned a lot. They both can say some words, such as, "mom", "dad", "goldfish", "bye", "hi", "cookie", "bear", "juice". Also, Amanda can say "Ilknur". Actually, it is not exactly the same but it is pretty close... :) We watch TV in the morning and in the afternoon. They love to watch "Dora the Explorer", "Go Diego", and "Sesame Street". Also they can say "Dora", "Boots", and "Elmo". They are calling their diapers "Elmo" since there is a picture of Elmo on them. We now have a deck and patio in the back yard so that the girls can play there. It is so much fun to watch them play there. Kimberly loves to sleep with her animal toys. Even when she wakes up, she doesn't want to leave them in the crib. She carries them and her blanket everywhere. They are so much fun.