Monday, October 26, 2015

Adding a drive to Ubuntu with VMware

Adding a drive to Ubuntu (Linux) after adding it with VMware

I assume you have created a drive and attached it to your guest and am not going to cover that here. This is how to get your system to see the drive you just added.

Find what host number your system is using.

grep mpt /sys/class/scsi_host/host?/proc_name
Here is an example from my system:


My system states host2 so to scan for new devices issue the command:
echo "- - -" > /sys/class/scsi_host/host2/scan
I let that run for a minute or so, it didn't seem like it was going to end on its own so I had to CTRL + C .  Next you need to create the partition on the disk, but you need to to find the device name. To do this, issue the command:
fdisk -l
It will list the device the device name, followed by details of the device, followed by partitions on the device. Since you just added a new device, the one you want will be the device name that does not have any partitions listed. An Example:


On my system the new drive is named sdb. Now, to create the partition. Issue the command (replace name of device with whatever your system name yours):
fdisk /dev/sdb
This will take you into the fdisk menu system. Do the following to create a new partition using default values:
n PRESS ENTER, PRESS ENTER, PRESS ENTER, PRESS ENTER, w PRESS ENTER

Now that we have a partition, it needs formatted. I am going to format the partition using ext4, to do so, issue this command:
mkfs.ext4 /dev/sdb1
Sdb because that was what my system named the device, the 1 is because it will be the first formatted partition on device.

Now that you have a formatted partition, it is time to mount it. Create a folder wherever you wish, for my system I am created a folder named data.
mkdir /data
To mount the disk so you can use it without rebooting.
mount /dev/sdb1 /data

Now we need to inform the system to mount the disk on bootup so we don't have to keep issuing the mount command. Open up the fstab file using the following command and append the line of data:

vim /etc/fstab
 /dev/sdb1   /data  auto  defaults  0 0

Huzzah! You have yourself a mounted drive!

 

Tuesday, June 5, 2012

Manage Firefox via Group Policy - Easy Method

Manage Firefox via Group Policy - Easy Method


You would think that Firefox by now would have some sort of "official" way to manage their browser and start making inroads into the corporate market, given all the hatred of IE about vulnerabilities and standards.

But they haven't. 

I found a few methods, one promising one was www.frontmotion.com, but it is rebranded. A few other nasty hacks that didn't feel right.

So, here is my solution:

  • Create a group policy object
    • Per User
      • Login Script
  • Create a batch file containing the following and point your policy to run the batch file:
if exist "%APPDATA%\Mozilla\Firefox" for /D %%F in ("%APPDATA%\Mozilla\Firefox\Profiles\*") do copy /y \\*domain_name*\netlogon\user.js %%F

Replace with YOUR domain name, no * *. 

This checks to see if Firefox is installed, if it is, copy a file named user.js (will create in next step) to Firefox's profile directory. Why the fancy copy command? Because Firefox creates a random profile folder in the user's application directory. 
  • Create a file named "user.js" and put it in your domain netlogon share (\\*domain_name*\netlogon)
The contents of this file is what controls the settings of firefox, here is an example of my settings:

user_pref("network.automatic-ntlm-auth.trusted-uris", "webfilter1,webfilter2");
user_pref("browser.search.defaulturl","http://www.google.com/");
user_pref("browser.startup.homepage","http://www.google.com");
user_pref("update_notifications.provider.0.frequency",30);
user_pref("security.warn_viewing_mixed",false);
user_pref("browser.shell.checkDefaultBrowser",false);
user_pref("profile.confirm_automigration",false);
user_pref("startup.homepage_welcome_url", "");
user_pref("browser.search.update", false);
user_pref("app.update.enabled", false);
user_pref("extensions.update.enabled", false);

I am not explaining all the settings here, you can find more info about user.js file here: http://kb.mozillazine.org/User.js_file

Basically, any setting in Firefox's about:config, you can add using the format above, one per line. 

So here is how it works.

User logs in, user.js is copied to their computer, Firefox loads, reads it preferences from prefs.js then reads user.js and settings in the user.js file override the prefs.js file. 

Why not just edit the prefs.js file? Because Firefox will restore prefs.js on close, over-writing your file. 

Full Disclaimer: This method was developed by a buddy I work with. 

Wednesday, April 21, 2010

Got Conficker? Network Scan Detection of Infected Machines

So you got the Conficker. You could go to each machine and run the eye chart test ( http://www.confickerworkinggroup.org/infection_test/cfeyechart.html), but in a bigger environment, or if you prefer to work smarter and not harder, you need some sort of test to pinpoint which machines are infected.

Answer = nmap (http://nmap.org)

I am using the windows version. With the latest version, the Conficker check is included with the rest of the scripts. Fire up nmap, command line (adjust screen buffer to see all results) or the Zenmap GUI, and in the command box or line, type:

nmap -p 445 -d --script smb-check-vulns.nse --script-args safe=1

For example, to check the 192.168.1.0 network range, type:

nmap -p 445 -d --script smb-check-vulns.nse --script-args safe=1 192.168.1.1-254

It takes a few minutes, don't worry if the GUI says not responding, it's still working. When complete, you will see some results. Here is what to look for:


Nmap scan report for machine.domain.com (192.168.1.122)
Host is up, received arp-response (0.00013s latency).
Scanned at 2010-04-21 09:29:26 Eastern Daylight Time for 1s
PORT    STATE SERVICE      REASON
445/tcp open  microsoft-ds syn-ack
MAC Address: 00:06:5B:2A:81:72 (Dell Computer)


Host script results:


| smb-check-vulns:  
|   MS08-067: CHECK DISABLED (remove 'safe=1' argument to run)
|   Conficker: Likely CLEAN
|   regsvc DoS: CHECK DISABLED (add '--script-args=unsafe=1' to run)
|_  SMBv2 DoS (CVE-2009-3103): CHECK DISABLED (add '--script-args=unsafe=1' to run)

Don't worry about the "CHECK DISABLED", those are extra checks that could crash a system, that is why we used the "--script-args safe". Look for "Conficker: Likely CLEAN". If it's good, you will see the clean message, if not, you will see the "Conficker: Likely Infected" message.

You will  get some other messages about not being able to check, those are usually network devices or other OS's that couldn't get Conficker anyway. Be sure to check though!

So now you know WHICH machines, WHAT to do about it?

Get the removal tool from here (http://www.symantec.com/security_response/writeup.jsp?docid=2009-011316-0247-99)

Run the tool, reboot, patch - each OS has different patch. The tool will tell you which one to get, do a Google search on it, download it, install it.

Install Antivirus!

Jeremy

Wednesday, April 14, 2010

Evil HP Color Laserjet 3500 - PCL XL Error

So we have this HP Color Laserjet 3500. Everything seems OK. Then, when trying to print from a particular program (based on Crystal Reports), we get a print out with the following:


PCL XL error

          Subsystem:       Kernal
          Error:               ColorSpaceMismatch
          Operator:         VendorUnique
          Position:           9

OK, google time. Whoa, a lot of people with this issue. Use the PCL driver, Use the PS driver they say.

Yeah.

It turns out, that HP had the brilliant idea (or you did, depending on which way you look at it) to save some money on hardware by using your PC power to do the printing legwork instead of the printer. Well, it SOUNDS good, but it turns out there may be some compatibility issues. 

They call it (maybe others do too, we just standardize on HP printers) Host Based printing. There is no PCL, PCL5, PCL5e, PS, etc, it does magic. Some programs don't like this magic. 

As I searched Internet and found the same problem over and over, with some clever solutions (HP has a "beta" fix to download, use a generic driver, other "thoughtful" solutions) - that did not work for me - I decided to go with a workaround. 

Install PrimoPDF, print to it, let it open after creation, then print. Extra work? Yes, but they did not want to buy a "standard" PDL (I believe it's called) printer with PCL support. 

So I finish uninstalling all the crap I just put on, reboot, Windows finds the printer, I point to the location of the SAME file I used for the initial install, let it finish, test page, and done. 

Just for S!@# and giggles, I had the user try to print again. WTF, it worked! For the love of God do not mess with that printer!

Bottom line - I hate that model now, and if you are having the same issue, load everything (even all the crap you don't need), load the beta fix driver, use the HP uninstaller in the start menu, restart, let windows find it, point to the "host based" driver from the HP website (not the big one, that is the "load everything" one), test page, and give it a shot!

BTW, some details of setup:

Windows XP Pro 32 bit
USB connection
User had local admin rights

- Jeremy

Wednesday, March 3, 2010

Windows XP Embedded - Does it need Antivirus?

We recently had an outbreak of the Conficker virus. While most of our PC's were protected, we did find some rogue windows devices. A converted picture frame, a recycled PC pointing to an old AV server with outdated definitions, etc.

I also found a PC that is running Windows XP Embedded. The vendor states (they installed it as part of a plotter system) that they never have had a virus on their systems as they do not talk to the Internet.

Well, Conficker spreads via the local LAN via a Windows vulnerability. Normally, our domain PC's are auto patched, but this one is not on our domain. It also does not have antivirus.

So, can it be infected? I googled "windows XP embedded virus" and it seems multiple vendors make products for them, leading me to believe - yes, they can be infected. I also read something about XPe (XP Embedded) having a special EWF - Enhanced Write Filter. The feeling I am getting is that EWF prevents writes to the hard drive. So should that keep if from being infected? Also, did the vendor configure EWF correctly?

Vendor won't let me in to the system to run a scan - don't know what they are afraid of. When I try to boot from a CD with a rescue disk to scan, the system will not accept my "boot from IDE CDROM" selection. Of course the BIOS is password protected.

Any thoughts?

Jeremy

Saturday, October 17, 2009

The Techie Generation?

My 12 year old daughter, whom I have built a PC from the ground up with, just asked me if she could have accidentally "unplugged" the flash plug-in. As in, physically, because she was under the desk plugging in another laptop.

/facepalm

Sunday, August 2, 2009

Burning mp4 files to DVD

I have some mp4 files that are encoded with H.264/MPEG-4 AVC video codec and mp4a: MPEG-4 AAC LC audio codec - according to GSpot Codec analyzer. I am using Windows 7, and want to burn these files onto a DVD using the DVD standard (not just data that will play in a PC). The built in DVD maker states it does not support these files. Handbrake errors out when I try to convert them, and a couple shareware programs just have not worked. Any ideas?

EDIT - ConvertXtoDVD 3

Thursday, June 25, 2009

Remove Servers That Report Offline

Situation: You have your clients configured to synchronize files with servers. For whatever reason, one of your file servers does not exist anymore, however, your clients still try to connect to it and it reports offline.

Solution:
  1. We need to remove the locally cached copies of those files. Open "My Computer", click "Tools | Synchronize...". Highlight the Offline Files folder, then click the properties button. This will bring up the magic Offline Files folder. To make it easier to read, on the menu bar, click "View | Details". If you scroll to the right, you will have a column named "Location". Click that header to sort on that field. Now, find the files that are referenced on your old server, highlight and delete. You may get a warning, say OK. If you are not a user with rights to the file, you may have to log in as administrator to perform this. WARNING - Someone probably knows why, but this delete takes FOREVER. So be prepared for a wait.
  2. While you may think you're done, you're wrong! There is a registry key that holds the shares you sync with that needs to be addressed, and it's tricky! It is stored under the local user hive, so, you have to be logged in as the user with the folder share that syncs to the missing server. Once logged in, open regedit, navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\NetCache\Shares\. If you expand shares, you will see entries for all the connections. Simply pick the offending server, right click > delete. You will have to RESTART the computer to reload the hive. (There is a way to access the user hive from administrator, under HKEY_USERS, but it is hard to decipher the "S-1-5-18" etc.)

Saturday, May 23, 2009

My Firefox Extensions (Add-ons) - Update May 2009


It's been a while since my original "My Firefox Extensions" listing, so here is an update. I put this out there for a couple reasons.

  • It helps me reinstall add-ons since I am all the time messing with my computer

  • List some add-ons I find helpful that other users may

I am now using Firefox 3.0.10 on Windows 7 RC Build 7100. However, I do run the same add-ons to my work and laptop which run XP. Now,on to the add-ons (trying not to use the term "extensions")!

  • AVG Safe Search - Comes with AVG Free Edition antivirus
  • Better Gmail2 - Makes Gmail better with user suggested features, fully customizable
  • Better YouTube - Same as above
  • ColorZilla - Web Developer tool to pick a color and get it's code from a webpage
  • DownThemAll! - Better download manager than the default
  • Fission - Eyecandy, creates a "progress bar" while page loads, ala Safari style
  • Google Enhancer - Make Google better
  • GooglePreview - Make Google better
  • Greasemonkey - Allows user defined scripts to be run to enhance webpages. There are TONS of them out there, a "Greasemonkey Scripts" search on Google should suffice.
  • IE Tab - Put Internet Explorer in a Firefox tab
  • MeasureIt - Web developer tool, measure a web page for pixel dimensions
  • Morning Coffee - Open a predefined set of tabs to websites you open everyday
  • Tab Mix Plus - Adds extra tab functions
  • Stumbleupon - Fun, lets you explore different websites
  • Web Developer - Web developer tool, A LOT of tools to help with website creation
  • Xmarks - Bookmark Sync
  • Wisestamp - Inserts HTML signatures with formatting in webmail accounts (Gmail, etc)
Know of one I missed? Let me know in the comments!

Wednesday, May 13, 2009

Windows 7 RC First Look

So far, I like it. Have not had one error, drivers were found. But always, there is a "gotchya".

Here are a listing of things that are not working as they should: (I will be adding to list as I find issues)

CONS:
5/13/09 - Windows Live Sync - This sync's files between PC's. It "says" it installs, but no icon, interface, or acknowledgment.
5/13/09 - Wk7 took over my system, even though I had it partitioned and told it what partition, Wk7 is the only OS available. I am transferring things over so might not have to worry about it, but it bugs me.
5/13/09 - Sharing is weird. They try to make it easier by assigning users to owner / contributor/ or reader. You can still get to the old interface by clicking properties then sharing tab.

PROS:

5/13/09 - LOVE the new taskbar preview interface.
5/13/09 - The tray management has improved.
5/13/09 - An address bar built into the task bar that uses the DEFAULT browser and not just IE
5/13/09 - Windows Media Player supports out of the box Xvid, DivX, MOV (in h.264 with stereo). It also has a stream feature that is suppose to connect directly to the XBOX 360. Will test that later.
5/13/09 - So far does not seem to be a resource hog. I have AVG on it with firewall turned on. Ran World of Warcraft, Ventrillo, and a browser with no problems.

Software
Out of the Box - No "Extra Work" - No Particular Order

  • Firefox
  • Dreamweaver CS3
  • Photoshop CS4
  • Vuze
  • Picasa
  • World of Warcraft
  • Ventrilo
  • Notepad++
  • Cisco VPN Client 5
  • UltraVNC - Still as buggy as in Vista though
  • Acrobat Reader 9
  • Amazon MP3 Downloader
  • AVG Free Edition Antivirus
  • Curse Client
  • Aptana
  • Windows Live Sync
  • Google Talk
  • "Official" NVIDIA GeForce 9800 GT Driver
  • Windows Media Player Stream Xvid / DivX to XBOX 360
  • Dropbox
Works - With "Extra Work"
  • HP Officejet J4680 All-in-One - I use this MFP in wireless mode. I was able to install the printer using traditional Windows add network printer methods, but, I want to use the scan to any station over the wireless feature. You need the Full HP driver for this. Currently (5/17/2009) there is not a Windows 7 driver. I had to get the Vista driver and run it in Vista compatibility mode. On my first scan, I received and error. I closed and reopened, and so far so good.
Does NOT Work
  • Windows Update states there is an update for my HP printer, it tries, then fails, and the help goes nowhere


If anyone has a solution or better way of doing something, PLEASE, let me know.

Thanks,

Jeremy

Sunday, April 12, 2009

Slipstreaming XP SP3 into a Volume Product

FYI - If you slipstream XP service pack 3 into a volume license product, the key no longer works. If there is a workaround, please, let me know!

Friday, December 5, 2008

Firefox URL Grabber

I use google reader for my rss feeds. I also use the add-on better greader. This allows me to read the article within the google reader interface.

What I want is a right click context menu option that copies the current page's url into the clipboard. I can't see it in the address bar because the page is encapsulated within google reader preview pane.

Anyone have any ideas?

Wednesday, October 22, 2008

Question: How to check to see if a user is still accessing a MSSQL database?

We run MSSQL servers for most of our databases. Occasionally, we need to reboot these servers. I can check to see if anyone has anything open on the windows side (open file shares), but, when trying to discern if anyone is actively using the SQL database, I cannot tell.

I open Enterprise manager, expand out to "Management" and I see "Current Activity". There I have:
  1. Process Info
  2. Locks / Process ID
  3. Locks / Object
1) Process Info
  • I have alot of PID's with status of "sleeping", Some are "background", and some are "runnable"
2) Locks / Process ID
  • I have a listing of spid's
3) Locks / Objects
  • I see a listing of databases
  • Each database list's a PID with lock type and mode
My question: What am I looking for!? I just want to make sure everyone is out so I can reboot. Can anyone clarify this for me?

Monday, October 20, 2008

Firefox Crashing on Exit - Windows Vista SP1

Seems like 75% of the time, when I close Firefox 3 on my Windows Vista SP1 Home Premium PC, it crashes and wants to send an error report. I have submitted it dozens of times. Looking on the Internets, this seems to be a common problem. One person suggested it was the "Better Gmail 2" addon, but I removed it and it still crashes. Others point to spyware. Well, I like to consider myself a bit of a PC guru, and there is NOT A CHANCE I have any spyware on thePC. AKA, the kids (or wife) aren't allowed on the computer!

Here is the firefox thread: (with no solution btw)

Link

If anyone has any answers, please let me know! (comments)

UPDATE: I believe the google toolbar was the problem. I read about it on the thread, disabled it, and "knock knock" on wood, no crashes!

Friday, October 17, 2008

Programs that Suck

Just thought I would start a list of suck programs that give me headaches, no particular order:

  1. Wordperfect - Because it does not use the printer in a standard windows way, so I end up with every other program printing, EXCEPT Wordperfect. Heaven forbid they use Word, you know, since we have already paid for it and all our IT staff are trained on it, and 90% of people use it. I know, I made that last statistic up.

I will be adding to this list as more programs tick me off, and they will. Do you have any programs that make you want to pull your hair out? Let me know in the comments.

Thursday, October 16, 2008

Google Maps won't load in Firefox

Are you having an issue loading google maps in firefox? Uninstall your skype add-in. Problem solved.

Don't ask me why, just know how :)

Wednesday, October 1, 2008

Finally, Gmail Signature Formatting - with HTML!

After giving up my search for a decent solution to the problem of not being able to apply basic formatting to my gmail signature, my favorite rss feed, lifehacker, let me in on Wisestamp.

This firefox addon allows you to put HTML into your favorite web based email application. Heck, if you don't know HTML, it allows you to use a WYSIWYG editor, and fill in the blank social website applications (digg, twitter, blogger, facebook, myspace, etc).

I just installed it and it works great. Let me know what you think or if you have any alternatives.

Tuesday, September 23, 2008

No Gmail Signature Formatting?

Come on, what's the deal? I can't even create a simple table to lay out some info? Anyone know of a solution? I know lifehacker had better gmail html signature, but that was before the new gmail. Anything now?

Monday, September 22, 2008

Missing Windows Vista Snipping Tool?

I know that Windows Vista comes with a handy dandy snipping tool, but, when I click the "orb" and start typing snipping, I get nothing.

Turns out, that the snipping tool is part of the tablet PC options, that I, uh, uninstalled because I do not have a tablet PC. I am crazy, I know.

Anyway, just thought that I would save some people the same headache I had.

To reinstall:
  • Click the "orb"
  • Control Panel
  • Programs
  • Turn Windows features on or off
  • Look for the tablet PC options check mark box, check it
  • Wait
Now, click the orb, type snipping, press enter, and up it comes!

Note: I read that the snipping tool is unavailable on Windows Vista Home Basic, but cannot confirm as I use premium.

Google Image Labeler

Just found this neat time killer. Google Image Labeler.

What it is:

You get partnered with a random person, then are shown images. You label them based upon what they are. If you and your partner correlate, you score points. It shows you images for two minutes. If you don't know, you can pass. It also has some "off limit" labels, which I suppose are what other people have agreed what the image is and they want fresh labels.

I find it a great time waster and it's fun gathering points!