Showing posts with label Windows XP. Show all posts
Showing posts with label Windows XP. Show all posts

Monday, November 26, 2012

Setting up Windows XP to use a time server

I needed to set up my Windows and Linux systems to all use time servers so that the times in the error logs on all systems would match. This does not seem to be as easy as I remembered it being for XP systems, and super easy for the Linux systems except that we've lobotomized their ethernet interfaces so that the whole LAN can be taken off of the WAN whenever we need. Consequently, I never got to a working answer with either system. (Update: See final solution at the end of the post.) Here is what I've learned so far:

Network Time Protocol (NTP) works by having branch systems poll systems higher up the tree rather than going to a central hub. Presumably, the base of the tree is a reliable server. Reliability at the branch level is increased by having them poll more than one other system, in fact any number which are then voted against each other. The branching levels are called STRATUMs, and it's bad form to connect to a STRATUM1 system but STRATUM2 or lower is fine.

Astonishingly, in Windows it seems to be set up to use an NTP time server, but to configure it oddly requires nightmarish direct registry modification. Per the following links:

http://www.atomic-clock.galleon.eu.com/support/windows-xp-ntp-time-server.html
http://support.microsoft.com/kb/314054

This set of slides from NIST hints that is could be possible to set everything up by using net time, and then stopping and starting w32time, but that can't be true otherwise M$ and others would have that instead of the registry modifications in their hints.

http://tf.nist.gov/service/pdf/win2000xp.pdf


After reading these links, my thoughts were more along the lines of "maybe the laptops are already set up to time servers and I just need to prove it to myself.". So the question of how to check if a server has been set up led to further dead ends until I decided to give that up too. Apparently, net time and w32tm can be used to find this out, except that not so much on XP. Apparently the /querysntp option doesn't exist for net time on XP, and w32tm fails if the local domain, protocols, or firewall aren't set up right.

http://superuser.com/questions/425233/how-can-i-check-a-systems-current-ntp-configuration

When I tried net time on the laptops I got "System error 5 has occurred. Access is denied." (It worked fine on my own laptop.) This apparently means access to the remote system, apparently if any systems in the local domain are mismatched this will fail, or if there's a firewall issue, or oddly if the computer times are mismatched (hope this isn't it):

http://support.microsoft.com/kb/555644

From a rootkit vendor:

http://www.personalcomputerfixes.com/general-errors/how-to-fix-system-error-5-%E2%80%93-%E2%80%9Caccess-is-denied%E2%80%9D/

And w32tm was full of options, none of which included a simple query as to the setup, as far as I could tell.

So eventually, I decided that the PC times seem really close to my own which I know is on a server, so they must be getting time from a server. How about the linux box?

Finally, something easy:

https://help.ubuntu.com/8.04/serverguide/NTP.html

Getting less eay:

http://www.ntp.org/ntpfaq/NTP-a-faq.htm

Too bad we turned off both the nameservice and even the gateways for these machines because we couldn't be bothered with any sort of sophistication when setting them up to run off of the network. Ah well.

Update: From the first link just above, I learned that it is possible for a sysadmin to run ntpdate directly to do a one-shot clock setup from another server. Presumably I wasn't able to use the gateways on my linux box to get to any other servers, but here's where it all comes together: what about polling the other systems on my LAN that are in the /etc/hosts table? Yes, I was able to reset the time on the linux box by using the windows laptop as my NTP host. Using:

sudo ntpdate [ip of the windows XP system]

and boom the ubuntu time now matches the time on my Windows laptop. Crude but effective, and it wouldn't have worked if my XP firewall had been better set up).

Furthermore, I added an entry in /etc/cron.daily to run ntpdate every day since the unix boxes seem to have an impressive amount of clock drift (a couple of minutes over the course of a month). This required that I add an executable script (named ntpdate per the examples but I think that the name is unimportant) to this directory which contained my ntpdate command. This was covered in the first ubuntu link above, however I also had to do some reading up on cron and found some very nice links for that:

http://www.unixgeeks.org/security/newbie/unix/cron-1.html

http://www.unix.com/unix-dummies-questions-answers/5695-cron-how-tell-s-working.html

http://www.softpanorama.info/Utilities/cron.shtml

The last link above is the one that confirmed that these are indeed just shell scripts in this directory, and ignore lines that begin with the standard shell script comment character #. On a side note, apparently the version of cron that I'm running in ubuntu is called "Nixie cron".

Then I had to correct the timezone. I did this by doing:

sudo dpkg-reconfigure tzdata

Which launches a hilarious terminal server that offers bios-like choices for location that allowed me to pick "New York" and set the time to the correct time zone. I got this from the following link, which is very nice and also reiterates everything that my previous ntp references told me, but in a much prettier way:

https://help.ubuntu.com/community/UbuntuTime


Tuesday, December 21, 2010

How to prevent a file on a USB drive from being accidentally deleted

I can't wait to try this answer:

http://www.experts-exchange.com/Storage/Storage_Technology/Q_23715466.html

Which says:

You can use NTFS file permissions to prevent casual users from inadvertently deleting files.

Format the stick with NTFS, then (assuming the stick is on E:) type the following console commands:

cd /d E:\
cacls . /T /G Everyone:R /G Administrator:F

Make sure to use "Administrator" and not the plural "Administrators". The former SID is worldwide unique to your computer, the latter isn't. This will allow only your PC to modify the stick.

There is no way to 100% prevent a determined user with admin on their box from modifying your files. A determined user can take ownership and override the ACL. But there will be evidence (the ACL has changed). It is hard to restore a foreign SID to hide the evidence of tampering, without using special tools.


For reference, here are the M$ KB pages for the cacls command and also cd /d which I hadn't seen before:

http://technet.microsoft.com/en-us/library/bb490872.aspx

http://support.microsoft.com/kb/162786

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chdir.mspx?mfr=true

Wednesday, September 15, 2010

How to tell if my XP is 32 or 64 bit

Short answer: You'd know if it was 64 bit.

Slightly better answer: The OS listed in the My Computer properties would have a "64" somewhere in the name.

This KB entry from M$ spells the above out for every possible OS with step by step instructions:

http://support.microsoft.com/kb/827218

Tuesday, August 24, 2010

This hardware will not be installed

Got an unusual reaction from Ken's computer when I tried to install the Actel FlashPro3 USB adapter. After first alerting me to a problem with the digital signing on the driver, it then cold refused to install the driver, with the message "This hardware will not be installed". This had the further unfortunate effect of locking out any other chance of installing the driver, although just for each particular USB port that I tried the adapter on (for some reason XP considers a USB adapter to be a new "installation" on each separate USB port. Fortunately for me this particular Dell had 6 USB ports built in. I was halfway through them when I began finding answers).

The short answer is that there's an option for driver signing checking that can be set to "Warn" or "Block", and it was set to "Block" on this particular computer. The best link that describes how to find and set the option was this one:

http://epsstore.ti.com/OA_HTML/csksxvm.jsp?JServSessionIdrootdlek21=sk38qb3i51.n6LzoN8L/AzOnMTOogTxpQOUtxCLbx0Ka0--&jttst0=6_23871%2C23871%2C-1%2C0%2C&jtfm0=&etfm1=&jfn=ZGC7722846B1965C3A173B60D74447730ADCDA2D62BAC770F48B94A4DECBA0B531D3DAFF87EFF42B47FC46FEF8672E4FC85C&lepopus=MCgMFTkEnGLWr9633c12WFtc:S&lepopus_pses=ZGD0C1329909761578899587F21F40759922FA043346DBC87B4924C179E1EA1A11B21140B68A8F1A07CC2FEB97090E0267F36BE8C149379E89&nSetId=91937&nBrowseCategoryId=10506&cskViewSolSourcePage=cskmbasicsrch.jsp%3FcategoryId%3D10506%26fRange%3Dnull%26fStartRow%3D0%26fSortBy%3D2%26fSortByOrder%3D1 (ugh.)

Furthermore, it is possible to force driver reinstallation for USB ports that are ignoring an attached adapter via the Device Manager. Just open the device manager and under USB ports find the "Unknown Device" (or the one with an exclaimation mark) and click on it to get a "Reinstall Drivers" option once the driver signing block has been removed.

http://support.microsoft.com/kb/314464

No answers found on how to blanket reset blocked devices on USB ports.

Monday, September 7, 2009

windows updater stuck at "preparing to download"

Still in the middle of trying to fix this. Many hits on Google, I am not the only one who has this problem. The fact that XP sp3 is mentioned in many hits probably means that the problem is with this update in particular. One link indicated that the best thing might be to install SP3 separately; I have a vauge memory that I had the same problem with SP2. Here's the SP3 link, although it's not as good as I thought it was: http://forums.macrumors.com/archive/index.php/t-706018.html

One link indicated that it might be a failed update (likely in my case), and a tool called "Belarc Advisor" can be used to find and remove the failed update. That link was: http://www.techspot.com/vb/topic105237.html. I'm trying it out now, this seems like a very powerful program. Note: no failed updates found.

Several other links referenced common advice apparently stemming from M$ Knowledge base articles. This one forum dissected that advice particularly well: http://www.opentechsupport.net/forums/archive/topic/13061-1.html

This forum thread implicates a problem with M$ .NET 1.1, which it seems is what I have (no, I'm up to 2.0). It also provides a little bit of detail about Updater's dependence on activeX, which I've somehow crippled on this machine in some way: http://www.pcguide.com/vb/showthread.php?t=31205

Friday, February 20, 2009

Useful Windows Shortcut Key combinations

The following Windows Shortcut Key combinations are particularly useful for continuing to use a system that has begun to crash, or has had certain functions disabled by a virus, or just doesn't have the taskbar set up nicely:

Windows-D: Iconify all windows Pretty Darn Quick, in other words get the desktop
Alt-Tab: Shift between running (or dying) applications
Ctrl-Esc: Gets the start menu. For instance if the mouse is dead, you can get this and navigate using the keyboard and arrow keys.
Ctrl-Shift-Esc: Gets the task monitor even if it's not possible to get it by other means

Monday, February 2, 2009

Not enough quota available to process this command

Presently unresolved thread for tracking a recurring error on one of the work XPS's.

The error is is not accessible. Not enough quota is available to process this command.

Once this is received, the only thing that can be done is close all programs and reboot the machine.

It is somewhat interesting that this is an XPS that has more memory than the others.
The hardware and software configuration is otherwise identical to the others, and no dissimilar programs are being run (Labview, Word, PDF Reader).

The interwub doesn't have a consensus to the problem, but the disparate postings and answers may all point to a common solution if I could just figure it out.

Nobody has fingered this as a virus issue.

First off is M$'s patronizing KB article:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/1495.mspx?mfr=true

Also here:
http://msdn.microsoft.com/en-us/library/ms820778.aspx

This thread:
http://74.125.95.132/search?q=cache:tBeocXxTxcEJ:forums.ni.com/ni/board/message%3Fboard.id%3D170%26thread.id%3D258595+Not+enough+quota+is+available+to+process+this+command&hl=en&ct=clnk&cd=7&gl=us

points to two interesting process monitoring options aside from good old Taskmon, including this one which seems well loved but looks useless:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

These guys trying to troubleshoot their software:
http://forum.sysinternals.com/forum_posts.asp?TID=4975

Have traced it to Access Control List problems? See these two:
http://groups.google.de/group/microsoft.public.win32.programmer.kernel/browse_thread/thread/a024fb3948d5943d/ba4e698efab83ada?lnk=st&q=%22Not+enough+quota+is+available+to+process+this+command%22&rnum=9&hl=de#ba4e698efab83ada
http://support.microsoft.com/kb/185292/en-us

These guys are trying to do simple file copies in Vista and having the problem, and traced it to something to do with offline file sync?
http://social.technet.microsoft.com/Forums/en-US/itprovistaapps/thread/c6c79225-dd97-41ce-aeb2-b3f46f235872/

Perhaps most promising for my configuration, this guy blamed it on Dell Control Utility:
http://discussions.virtualdr.com/archive/index.php/t-129176.html