Copy Between Linux Computers

Growing up on Macintosh computers, I always feel a little crippled on my basic computer knowledge. I’m not good with DOS. I didn’t know, until recently, what an IRQ was. I had no idea how to make a bootable MS-DOS disk for ghosting. I didn’t know how to copy files between Linux systems, but I could writeup some IPchains no problem. Odd.

So anyway, here’s the command that you run on the server you’re copying FROM:
scp file_name user_name@ip_address:/directory_listing/
SCP: Secure copy
File_name: the name of the file you want to copy
User_name: name of the user with privs to the directory you’re copying to
Ip_address: IP of the server you’re copying to
Directory_listing: starts with / and doesn’t need a trailing /

In my case it’d be:
scp bigfile.iso ituser@10.1.2.2:/home/ituser

EDIT!!!!

There is also a program called WinSCP that allows you to move files back and forth with an FTP-style interface. I highly recommend it to those who use Windows.

EDIT 2 April 11, 2015
Obviously I should have included Rsync:
rsync -ru /src/dir/* root@remoteserver:/remote/dir/other/dir/

Exchange 2007 Change Message Size Limits

In Exchange 2003 it was very easy to change the message size limits – each user had their own settings. 2007 has a little more difficult process, and it groups everyone as one. We’re currently not using SP1, so some of the steps will probably change. SP1 will eventually make its way on our servers, but until then we’ll just stick with a patched standard version.

To change the maximum allowed OUTSIDE your domain (outgoing email):
Set-Transportconfig -maxsendsize size_in_bytes
Obviously replace size_in_bytes with the size you require.

To change the maximum allowed INSIDE your domain (incoming email):
First, we need to find the Identity of your server (or servers)
Get-sendconnector | List
You’ll find a bunch of information printed on your screen, we only really need the MaxMessageSize and the Identity. If the MaxMessageSize is set to something you already like, you do not need to change anything.
If you have more than one server in your environment, you must do this command for each of the servers.
Set-Sendconnector -Identity identity_name -MaxMessageSize message_size_in_bytes
Replace identity_name with the identity of the server and message_size_in_bytes to the actual size you want.

Vista Power Plan

I’ve been using Vista on and off again for the past 18 months, and only recently have I really begun to dive into this whole Vista craze. Or lack of a craze. Either way, it’s beginning to become a pain to find drivers for XP on brand new systems (unless it’s a Dell or HP system).

Well, one thing I do like about Vista is how it handles the throttling of the CPUs. Microsoft really opened up all the options for power savings – which is probably why I end up with an extra hour of battery life when using Vista over XP. Ubuntu is still better, but that’s getting off topic.

I created my own power plan. Everything was peachy. When on battery I underclocked my system to 800MHz and .800 core volts. That’s the lowest it could go, and since it’s dual core it’s pretty close to a 1.6GHz machine. And when plugged in, I put it up to 1400MHz, but it rarely ever even popped up there. Why underclock a 2.2GHz machine? I’m not a fan of heat.

But randomly the power settings would go away. The max processor would move from my 1% to 100%. It usually happened after updating the system, but that wasn’t always a factor.

Long story short, it started to peeve me that the computer would revert back to it’s original settings. I wanted it to run as slow and cool as possible. Lucky for me (and maybe you) I finally found a command to edit the power settings. No more clicking into 803838038 different menus to change it.

You can find it Here. It’s called Power3.bat, and it doesn’t harm your computer in any way. You can even edit it if you’d like. I’ve done all the hard work.

In fact, here’s the code:
powercfg -setacvalueindex SCHEME_BALANCED SUB_PROCESSOR PROCTHROTTLEMIN 10
powercfg -setacvalueindex SCHEME_BALANCED SUB_PROCESSOR PROCTHROTTLEMAX 50
powercfg -setdcvalueindex SCHEME_BALANCED SUB_PROCESSOR PROCTHROTTLEMIN 1
powercfg -setdcvalueindex SCHEME_BALANCED SUB_PROCESSOR PROCTHROTTLEMAX 25
powercfg -S SCHEME_BALANCED
pause

Boot.INI Options

I recently put together an HP server (DL360) to be used purely for web hosting. It has 6GB RAM and a dual 74GB SAS in RAID 1 setup. Windows Server 2003 was installed because the client needs ASP and .net support, and this is the easiest way. Unfortunately, due to a .net program the client must use, Server 2003 was installed using 32bit technology. That means the 3.25GB RAM the system is reading is due to the 32bit limitations.

So I had to brush up on my boot.ini flags to fix this issue:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise PAE" /noexecute=optin /fastdetect /PAE /3GB

Here are the flags per Microsoft’s website (I removed the ones you will never use):

* /3GB
Increases the size of the user process address space from 2 GB to 3 GB (and therefore reduces the size of system space from 2 GB to 1 GB). Giving virtual-memory- intensive applications such as database servers a larger address space can improve their performance. For an application to take advantage of this feature, however, two additional conditions must be met: the system must be running Windows XP, Windows Server 2003, Windows NT 4 Enterprise Edition, Windows 2000 Advanced Server or Datacenter Server and the application .exe must be flagged as a 3-GB-aware application. Applies to 32-bit systems only.
* /BASEVIDEO
Causes Windows to use the standard VGA display driver for GUI-mode operations.
* /BOOTLOGO
Use this switch to have Windows XP or Windows Server 2003 display an installable splash screen instead of the standard splash screen. First, create a 16-color (any 16 colors) 640×480 bitmap and save it in the Windows directory with the name Boot.bmp. Then add “/bootlogo /noguiboot” to the boot.ini selection.
* /BURNMEMORY=
Specifies an amount of memory Windows can’t use (similar to the /MAXMEM switch). The value is specified in megabytes. Example: /BURNMEMORY=128 would indicate that Windows can’t use 128 MB of the total physical memory on the machine.
* /EXECUTE
This option disables no-execute protection. See the /NOEXECUTE switch for more information.
* /FASTDETECT
Default boot option for Windows. Replaces the Windows NT 4 switch /NOSERIALMICE. The reason the qualifier exists (vs. just having NTDETECT perform this operation by default) is so that NTDETECT can support booting Windows NT 4. Windows Plug and Play device drivers perform detection of parallel and serial devices, but Windows NT 4 expects NTDETECT to perform the detection. Thus, specifying /FASTDETECT causes NTDETECT to skip parallel and serial device enumeration (actions that are not required when booting Windows), whereas omitting the switch causes NTDETECT to perform this enumeration (which is required for booting Windows NT 4).
* /LASTKNOWNGOOD
Causes the system to boot as if the LastKnownGood boot option was selected.
* /MAXMEM=
Limits Windows to ignore (not use) physical memory beyond the amount indicated. The number is interpreted in megabytes. Example: /MAXMEM=32 would limit the system to using the first 32 MB of physical memory even if more were present.
* /MAXPROCSPERCLUSTER=
For the standard x86 multiprocessor HAL (Halmps.dll), forces cluster-mode Advanced Programmable Interrupt Controller (APIC) addressing (not supported on systems with an 82489DX external APIC interrupt controller).
* /NOEXECUTE
This option is only available on 32-bit versions of Windows when running on processors supporting no-execute protection. It enables no-execute protection (also known as Data Execution Protection – DEP), which results in the Memory Manager marking pages containing data as no-execute so that they cannot be executed as code. This can be useful for preventing malicious code from exploiting buffer overflow bugs with unexpected program input in order to execute arbitrary code. No-execute protection is always enabled on 64-bit versions of Windows on processors that support no-execute protection. There are several options you can specify with this switch:
o /NOEXECUTE=OPTIN Enables DEP for core system images and those specified in the DEP configuration dialog.
o /NOEXECUTE=OPTOUT Enables DEP for all images except those specified in the DEP configuration dialog.
o /NOEXECUTE=ALWAYSON Enables DEP on all images.
o /NOEXECUTE=ALWAYSOFF Disables DEP.
* /NOGUIBOOT
Instructs Windows not to initialize the VGA video driver responsible for presenting bitmapped graphics during the boot process. The driver is used to display boot progress information, so disabling it will disable the ability of Windows to show this information.
* /NOLOWMEM
Requires that the /PAE switch be present and that the system have more than 4 GB of physical memory. If these conditions are met, the PAE-enabled version of the Windows kernel, Ntkrnlpa.exe, won’t use the first 4 GB of physical memory. Instead, it will load all applications and device drivers, and allocate all memory pools, from above that boundary. This switch is useful only to test device driver compatibility with large memory systems.
* /NOPAE
Forces Ntldr to load the non-Physical Address Extension (PAE) version of the Windows kernel, even if the system is detected as supporting x86 PAEs and has more than 4 GB of physical memory.
* /NUMPROC=
Specifies the number of CPUs that can be used on a multiprocessor system. Example: /NUMPROC=2 on a four-way system will prevent Windows from using two of the four processors.
* /ONECPU
Causes Windows to use only one CPU on a multiprocessor system.
* /PAE
Causes Ntldr to load Ntkrnlpa.exe, which is the version of the x86 kernel that is able to take advantage of x86 PAEs. The PAE version of the kernel presents 64-bit physical addresses to device drivers, so this switch is helpful for testing device driver support for large memory systems.
* /PCILOCK
Stops Windows from dynamically assigning IO/IRQ resources to PCI devices and leaves the devices configured by the BIOS. See Microsoft Knowledge Base article Q148501 for more information.
* /SAFEBOOT:
Specifies options for a safe boot. You should never have to specify this option manually, since Ntldr specifies it for you when you use the F8 menu to perform a safe boot. (A safe boot is a boot in which Windows only loads drivers and services that are specified by name or group under the Minimal or Network registry keys under HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot.) Following the colon in the option you must specify one of three additional switches: MINIMAL, NETWORK, or DSREPAIR. The MINIMAL and NETWORK flags correspond to safe boot with no network and safe boot with network support, respectively. The DSREPAIR (Directory Services Repair) switch causes Windows to boot into a mode in which it restores the Active Directory directory service from a backup medium you present. An additional option you can append is (ALTERNATESHELL), which tells Windows to use the program specified by the HKLM\SYSTEM\CurrentControlSet\ SafeBoot\AlternateShell value as the graphical shell rather than to use the default, which is Windows Explorer.
* /SOS
Causes Windows to list the device drivers marked to load at boot time and then to display the system version number (including the build number), amount of physical memory, and number of processors.
* /USERVA=
This switch is only supported on Windows XP and Windows Server 2003. Like the /3GB switch, this switch gives applications a larger address space. Specify the amount in MB between 2048 and 3072. This switch has the same application requirements as the /3GB switch and requires that the /3GB switch be present. Applies to 32-bit systems only.

Acer Drivers

One of the worst companies to find drivers for is Acer. That is followed closely by Fujitsu and Sony, and then probably IBM. HP and Dell are both very easy to find drivers for.

Take, for example, my current Acer laptop: Extensa 4420. You can “find” the drivers for it, but they won’t all work. XP support is non-existent, but since it came with 32bit vista, you’d think it’d be an easy task to reformat the laptop and install 32bit vista business.

Nope.

If you ever need to find drivers, here’s the source:
ftp://ftp.work.acer-euro.com/

Here’s another hint: if you can’t find your model number, or the drivers don’t seem to work, just change the model slightly. In the example above, the 4420 drivers don’t all work. But the 4430 drivers do.

I also had another Acer laptop that wasn’t even listed on Acer’s website. Odd. I had to go to that acer-euro site (not the americas one) to find anything even close to the model number.

Just figured I’d put this out there for others to use.

Samba Issues and Fix

After installing CentOS 5.2 x64, webmin 1.420, and vmware server 2.0.0, I tried to get samba working.

Getting samba to work correctly is the easiest via the webmin interface. Webmin actually makes almost everything easier. I like it when computers are made easier. Thank you, webmin. You can find how to install webmin by searching for webmin. Too bad I don’t get paid for the number of times I can type webmin. I’d be rich. Webmin.

Back to the task at hand… I set samba up to work:
yum install samba
But it’s not set to automatically start, so we have to use webmin ($$$) to get it to auto start. Samba requires two services to run:
1.) SMB – starts and stops the Samba smbd and nmbd daemons used to provide SMB network services.
2.) winbind – starts and stops the Samba winbind daemon.
I set both of them to startup when the system starts.

Then I set the permissions on a folder (/var/lib/virtual machines/) which I called vmware. They are/were setup correctly. But I couldn’t attach from my windows box to the samba share. Permission denied.

So then I tried to chmod -R 777 /Virtual\ Machines
Didn’t work.

As a final attempt, I tried to smbpasswd (username)
Typed in a new password
Failed to find entry for user (username)
Failed to modify password entry for user (username)

Webmin failed me! It said that it converted the users for me, but obviously it hasn’t.
So here’s the fix:

smbpassword -a (username)
New SMB password:
Retype new SMB Password
Added user (username)

And then, like magic, samba started working! Whooo!

EACCESS Violation

I try to reboot as few times as possible. The only problem with that logic is when something I do breaks the system but I don’t know about it until after a reboot. Case in point is when I installed a program demo called TuneBite about 2 weeks ago. I just restarted today to get a Realtek error:
“EACCESS Violation”

Yay. I had no idea it was caused by TuneBite either. I figured something was corrupt in my sound drivers. Sounds were still working, but not the way they should have been (internal speaker worked, external jacks did nothing).

I installed the newest versions of the Microsoft HD Audio driver and the newest release of the RealTek Audio driver. Rebooted. Same error.

Uninstalled TuneBite software – Rebooted – Error is now gone. I’m not a big fan of software that always loads in the background either, especially when that software shouldn’t be loading in the background. I had only used TuneBite one time, but according to the add/remove programs it said the last time I used it was today. Today != 2 weeks ago.

I can not recommend this software.