Thomas Mullaly

DevOps, Security and IT Leadership

Windows 7 ARP Problem

There’s been an arp problem with the new dells.

C:\Windows\system32>arp -a

Interface: 192.168.105.199 --- 0xb
  Internet Address      Physical Address      Type
  192.168.104.2         00-03-ba-1d-a9-70     dynamic
  192.168.104.3         00-03-ba-67-d4-e9     dynamic

Type cmd then ctrl + shift + enter to get admin privilege.

C:\Windows\system32>netsh -c "interface ipv4"
  netsh interface ipv4>set neighbors "Local Area Connection" 192.168.104.1 00-09-43-1b-21-4c
  netsh interface ipv4>exit

Enable Group Policy in Windows 2008

Group Policy provides an infrastructure for centralized configuration management of the operating system and applications that run on the operating system. It is not enabled by default.

You can manage local and domain Group Policy by using domain-based versions of Windows Server 2008 R2. Although the Group Policy Management Console (GPMC) is distributed with Windows Server 2008 R2, you must install Group Policy Management as a feature through Server Manager.

You can also manage local and domain Group Policy by using Windows 7. For managing local Group Policy, the Group Policy Object Editor has been replaced by the Local Group Policy Editor. To manage domain Group Policy, you must first install the GPMC. The GPMC is included with RSAT, which is available for download:

[[http://go.microsoft.com/fwlink/?LinkId=130862 Windows Server 2008 R2 Remote Server Administration Tools for Windows 7]]

RSAT enables IT administrators to remotely manage roles and features in Windows Server 2008 R2 from a computer that is running Windows 7. RSAT includes support for the remote management of computers that are running either a Server Core installation or the full installation option of Windows Server 2008 R2. The functionality RSAT provides is similar to Windows Server 2003 Administration Tools Pack.

Installing RSAT does not automatically install the GPMC. To install the GPMC after you install RSAT, click Programs in Control Panel, click Turn Windows features on or off, expand Remote Server Administration Tools, expand Feature Administration Tools, and select the Feature Administration Tools and Group Policy Management Tools check boxes.

Find Number of CPU Cores Command

How do I find out the number of CPU cores available under HP x86_64 Linux serer running on RHEL / Debian Linux 6.x?

You can use the lscpu or nproc command to display the number of processing units available to the current process, which may be less than the number of online processors (please note that not all server supports hotplug a CPU on a running Linux system).

The proc file system is a pseudo-file system which is used as an interface to kernel data structures. It is commonly mounted at /proc. The /proc/cpuinfo file is nothing but a collection of CPU and system architecture dependent items, for each supported architecture a different list. Two common entries are processor which gives CPU number and bogomips; a system constant that is calculated during kernel initialization. SMP machines have information for each CPU.

nproc Example

The nproc command shows the number of processing units available:

nproc

Sample outputs:

8

lscpu Command

lscpu gathers CPU architecture information form /proc/cpuinfon in human-read-able format:

lscpu

Sample outputs, vm71 and cyan:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            15
Model:                 65
Stepping:              2
CPU MHz:               2593.109
BogoMIPS:              5186.21
L1d cache:             64K
L1i cache:             64K
L2 cache:              1024K
NUMA node0 CPU(s):     0
</code>
<code>
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              6784.26
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

/proc/cpuinfo

The /proc/cpuinfo and sysfs stores info about your CPU architecture ike number of CPUs, threads, cores, sockets, NUMA nodes, information about CPU caches, CPU family, model, bogoMIPS, yte order and much more:

less /proc/cpuinfo

Debian Linux

[[apt reference]]

[[Installing MySQL]]

[[Linux CPU info commands]]

How to Create an Active Directory Server

Clone a new server

Create a clone from the Windows 2008 R2 Gold Master

Rename the Server

Call it AD Shutdown the server

Change the Network

While powered off, change the network settings

Change the Network to be Custom (VMnet7)

Power on the VM ##Change the Network Configuration Open up the Network and Sharing Center

Click on Local Area Network

Click on Properties

Choose IPv4 and Click Properties

Make the network config as follows: IP address: 10.10.10.10 Subnet mask: 255.255.255.0 Default gateway: 10.10.10.1 DNS: 127.0.0.1

Click on OK

Install the Active Directory Role

Open the Server Manager

Click on Roles

Click on Add Roles

Next

Select Active Directory Domain Services

Reboot

Open Server Manager and Run the Active Directory Services Installation Wizard (dcpromo.exe)

Create a domain in a new forest

FQDN: tom.umb.edu

Functional Level: Windows Server 2008 R2

Make sure DNS sever is checked

Yes you want to continue

Reboot

Android Development Setup

All development has to be done locally for now. I created a /android directory on each linux machine and put eclipse and the Android sdk in there. I might find a place on the network, but the linux desktops are not mounting /tools (yet).

To use it, start eclipse using the absolute path, if you don’t use the absolute path, you’ll be using the system eclipse which is older and has no android sdk. /android/eclipse/eclipse

The Android virtual devices HAVE TO BE ON A LOCAL DRIVE!!! We’re using /tmp to keep the AVD’s in, so you’ll probably have to recreate the AVD’s each time you login. It’s the best I can come up with in this environment. Create a sym link to /tmp cd ~ ln -s /tmp .android

Find my project on [[http://www.bitbucket.org bitbucket.org]] and create a fork. You will be working with your own forked (which is a clone) repository. You will clone locally (checkout), commit (and branch if you want) and push to your fork. You can then request a pull and I’ll merge your changes into the master.

Clone YOUR newly created fork into your home directory cd ~ git clone https://bitbucket.org/tommyfun/androidmaps

Now fire up eclipse and import the project

Chmod

====== Fix course directory permissions ====== cd /courses/coursename/f12/profname sudo chmod 750 username sudo chmod +s username sudo chmod 750 username

This might have worked: sudo chmod g+s username

Puppet Tutorial

We’re going to create two vms to practice using puppet.

First make sure you have done [[How to make an Ubuntu Gold Master Image]]

Now clone the Gold Master Virtual Machine twice, once for the master and one for the client.

http://docs.puppetlabs.com/learning/agentprep.html

Winston S Definition of a Technology

The definition of “a technology”, excerpted from WINSTON “Children of Invention Revisited”, p. 3: “Instead, we will think of technologies as consisting of several distinguishable but interacting aspects:

  • skill, techniques, human activity-forms, or sociotechnical practices;
  • resources, tools, and materials;
  • technological products, or artifacts;
  • ends, intentions or functions;
  • background knowledge; and
  • the social contexts in which the technology is designed, developed, used and disposed of.

These six aspects are present in every technology.”

Be able use these six (6) aspects to define the technology of a) your cell phone (“cell phone technology”) and either b) a pair of eyeglasses (invented in Pisa, Italy at the end of the thirteenth century) (WINSTON, Landes article, p 29-30) or c) a central power plant (the first one for electricity started up in 1881)(Wikipedia: [[http://en.wikipedia.org/wiki/Electricity_generation Electricity generation]], “History”)

Ubuntu Automatic Updates

The unattended-upgrades package can be used to automatically install updated packages, and can be configured to update all packages or just install security updates. First, install the package by entering the following in a terminal:

sudo apt-get install unattended-upgrades

To configure unattended-upgrades, edit /etc/apt/apt.conf.d/50unattended-upgrades and adjust the following to fit your needs:

Unattended-Upgrade::Allowed-Origins {
	"${distro_id}:${distro_codename}-security";
//	"${distro_id}:${distro_codename}-updates";
//	"${distro_id}:${distro_codename}-proposed";
//	"${distro_id}:${distro_codename}-backports";
};

Certain packages can also be blacklisted and therefore will not be automatically updated. To blacklist a package, add it to the list:

Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

The double “//” serve as comments, so whatever follows “//” will not be evaluated.

To enable automatic updates, edit /etc/apt/apt.conf.d/10periodic and set the appropriate apt configuration options:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

The above configuration updates the package list, downloads, and installs available upgrades every day. The local download archive is cleaned every week.

You can read more about apt Periodic configuration options in the /etc/cron.daily/apt script header.

The results of unattended-upgrades will be logged to /var/log/unattended-upgrades.

Notifications Configuring Unattended-Upgrade::Mail in /etc/apt/apt.conf.d/50unattended-upgrades will enable unattended-upgrades to email an administrator detailing any packages that need upgrading or have problems.

Another useful package is apticron. apticron will configure a cron job to email an administrator information about any packages on the system that have updates available, as well as a summary of changes in each package.

To install the apticron package, in a terminal enter:

sudo apt-get install apticron

Once the package is installed edit /etc/apticron/apticron.conf, to set the email address and other options:

EMAIL=”root@example.com”