Tag Archives: MAC

Check for entry of specific pattern

By TAPE

Hey Guys and Gals,

I am having trouble with what I thought shouldn’t be hard..

In a script I am working on there is a need to enter a MAC address.

MAC addresses are formatted ;
XX:XX:XX:XX:XX:XX

where X can be 0-9, a-f or A-F

So in the sample script the query is something along the lines of ;
(realize the syntax is wrong but hope you get what I am getting at 😉 )

Code:


if [[ $INPUT == [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F] ]] ; then echo "Happy Puppy 🙂 "
else
echo "Sad Puppy 🙁 "
fi


Obviously the above is not working, but what would be the best way to check whether the variable is indeed following the desired pattern ?

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

How One Model Is Using Her Personal Story to Fight for Marriage Equality

By Jen Michalski

…read more

Source: FULL ARTICLE at fashionologie

Germans fine Google for gathering personal data with Street View cars

Google must pay a €145,000 (US$190,000) fine in Germany for gathering and storing emails, photos, passwords and chat protocols from unprotected Wi-Fi networks with Google Street View cars, Hamburg’s Commissioner for Data Protection and Freedom of Information said on Monday.

Google’s Street View cars collected data from Wi-Fi networks such as SSIDs (service set identifiers), MAC addresses and personal payload data beginning in 2008, the company said in 2010. That admission prompted a German lawyer to request that the public prosecutor in Hamburg start a formal criminal investigation into Google’s practices.

However, in November 2012, 2 years and 9 months later, the prosecutor’s office decided not to pursue a criminal investigation into the matter because it was unable to find any violation of German criminal standards, it said at the time.

After that, Hamburg Data Protection Commissioner Johannes Caspar decided to reopen regulatory offense proceedings.

To read this article in full or to leave a comment, please click here

From: http://www.pcworld.com/article/2036080/germans-fine-google-for-gathering-personal-data-with-street-view-cars.html#tk.rss_all

UUIDs and Linux: Everything you ever need to know

KCM-Shell-devinfo

What is so special about UUIDs in Linux? I don’t know! But a single, simple short tip about looking up UUIDs in Linux from 2007 is one of the most successful posts I ever wrote! And is still looked up by hundreds each day! So I decided: Feed the masses.

Here is everything you ever need to know about UUIDs on Linux. The list is feature complete. Of course. *cough*

Background

UUIDs are 16 byte wide identifiers described in RFC 4122 which are used in software development to uniquely identify information with no further context. An example UUID is:

13152fae-d25a-4d78-b318-74397eb08184

UUIDs are probably best known in Linux as identifier for block devices. The Windows world knows UUIDs in the form of Microsoft’s globally unique identifiers, GUID, which are used in Microsoft’s Component Object Model.

The UUIDs are generated in various variants: originally most of them were derived from the Computer’s MAC, later hash sums of names were used. And about the question, how many UUIDs there are and how big the chance is that you will generate a a number you already own, here are some numbers from Wikipedia’s UUID article:

After generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%. The probability of one duplicate would be about 50% if every person on earth owns 600 million UUIDs.

Usage in fstab

As mentioned UUIDs are most often used in Linux to identify block devices. Imagine, you have a couple of hard disks attached via USBs, than there is no persistent, reliable naming of the devices: sometimes the first USB hard disk is named “sda”, sometimes it is named “sdb”. So to uniquely address the right disk for example in your /etc/fstab, you have to add an entry like:

UUID=9043278a-1817-4ff5-8145-c79d8e24ea79 /boot ext3 defaults 0 2

Linux implementation and generation

In Linux UUIDs are generated in /drivers/char/random.c?id=refs/tags/v3.8, and you can generate new ones via proc:

$ cat /proc/sys/kernel/random/uuid
eaf3a162-d770-4ec9-a819-ec96d429ea9f

There is also the library libuuid which is used by uuidgen and especially by the ext2/3/4 tools E2fsprogs to generate UUIDs:

$ uuidgen 
f81cc383-aa75-4714-aa8a-3ce39e8ad33c

How to get them, bash style

The most interesting part in UUIDs is most likely how to get the current UUIDs of the hard disks. As already mentioned years ago, there are two major ways to retrieve them: a simple ls call in a special directory, and the tool blkid.

So, first the ls call which has to be made in the directory /dev/disk/by-uuid. The directory contains links named after the UUIDs and pointing to the “real” block device files. Pretty handy if you are on a system where hardly anything is installed.

$ ls -l /dev/disk/by-uuid
lrwxrwxrwx 1 root root 10 11. Okt 18:02 53cdad3b-4b01-4a6c-a099-be1cdf1acf6d -> ../../sda2

The second call uses the tool blkid which is part of the util-linux package. It provides a real interface to actually query for certain devices and also supports searching for labels.

$ blkid /dev/sda1
/dev/sda1: LABEL="/" UUID="ee7cf0a0-1922-401b-a1ae-6ec9261484c0" SEC_TYPE="ext2" TYPE="ext3"

And there …read more
Source: FULL ARTICLE at Planet KDE

Meanwhile, in Los Angeles…

Hollywood can be a male-dominated town, but the actresses, producers, and industry stalwarts of Women in Film set Oscar weekend in motion yesterday. The organization—along with MAC, Max Mara, and Perrier-JouĂ«t—threw its sixth annual pre-Oscars cocktail last night, hosted by last year’s best supporting actress, Octavia Spencer. She was glad to lend some of her own support to fellow actresses, she said. “Men are celebrated every day. It’s easy to get a project green-lighted if you’re a guy,” she explained. “That’s why I’m excited about Bridesmaids and [2012 nominee] Melissa McCarthy”—an actress Spencer thinks is changing the game.

Plenty of Sunday night’s nominees came to toast their chances, including game changer QuvenzhanĂ© Wallis (history’s youngest best-actress nominee), Jessica Chastain, and Silver Linings Playbook‘s Jacki Weaver. “When we were making it, we knew it was special,” she said of the film that’s up for eight awards Sunday night. Weaver’s director, David O. Russell, revealed that his star, Jennifer Lawrence, almost missed out on her Oscar-nominated leading role. “Jennifer was a last-minute, ‘I don’t think this will work’ Skype audition, and she ended up stealing the role.”

Not far away, the Elton John AIDS Foundation and LoveGold celebrated a Best Documentary Feature nominee, the AIDS doc How to Survive a Plague, at Chateau Marmont. Sir Elton, Sharon Stone, and Cameron Silver were on hand, as was the film’s director, David France. “It tells an incredible story,” he said of the film, “a true story about how a group of disenfranchised people changed the world.” Hoorsenbuhs’ Robert Keith and Kether Parker were there to show not only support but also a few jewels from their men’s collection. “I like the gold, intensive pieces. They’re masculine,” Parker said. Not a bad consolation prize to keep in mind for anyone who doesn’t take the gold this Sunday night.

—Alexis Brunswick and Azadeh Ensha …read more
Source: FULL ARTICLE at Style Features

Speed Data-ing: You’re Broadcasting Traffic Reports without Even Knowing It

By Jared Gall

Speed Data-ing: You’re Broadcasting Traffic Reports without Even Knowing It

As navigation systems transition from showing us where to go to telling us what traffic looks like along the way, better real-time information can be a big selling point. Traffic-info providers synthesize information from a number of disparate sources, but traffic choppers are expensive relics of the Ron Burgundy era and sensors embedded in roadways are fragile and often unreliable. The key to perfecting real-time traffic information may soon (if not already) be you.

Nearly all cell phones sold today are equipped with Bluetooth. Several years ago, researchers at the University of Maryland hatched a plan to replace expensive roadside radar installations and other observation methods with Bluetooth tracking. Cheaper than the ­traditional solutions, Bluetooth field detectors catalog media access control (MAC) addresses, or the electronic IDs of the passing mobile devices. A central processor calculates the speed of traffic over a given stretch of road based on each device’s travel time between detection points. Those worried that the cops will spot their feloniously brief transit from points A to B and mail them a speeding ticket should note that nobody knows your device’s MAC address. No database of them exists, and many traffic-info systems in use today encrypt individual addresses as soon as they’re logged. Still worried your Droid will be appropriated by The Man for traffic logging? Write your congressional representatives, or, easier yet, turn off your phone’s Bluetooth. Or follow our advice for dodging traffic: Take a scenic back road.



Elegant as the Bluetooth solution may be, it still requires a network of field detectors strung along every corridor data suppliers wish to track. As an alternative, traffic-data companies are increasingly gathering info on vehicle position and speed from drivers’ own nav systems, whether they are installed by the carmaker, purchased at a store, or running as an app on a smartphone. This two-way conversation turns any driver who participates in the feedback loop into a sort of scout. Whether you’re poking at your screen to report construction backups, speed traps, or accidents, apps such as Traffic! (free from traffic-data house Inrix) feed data back to the mother ship for packaging and sale—possibly to the car right behind you.

Less-Mean Streetswe’re all wusses now
Less-Mean Streets

We tend to think of roadways as the exclusive domain of cars. The National Complete Streets Coalition, an advocacy group, seeks to change that by broadening traffic planning for non-motorized users, including children, the elderly, and the disabled. It prescribes the smart integration of features such as crosswalks, medians, and dedicated bicycle and bus lanes.

Planners …read more
Source: FULL ARTICLE at Car & Driver

Milo Casagrande: Fixing Network Errors in VirtualBox

This is that kind of post that are more necessary to me for remembering than anything else. Lots of digital ink has already been spent on this topic, but, as others I guess, I find that writing down things helps me remembering them (and mind-maps are precious on that front).

VirtualBox Clone Operation

I have a couple of local virtual machines installation for Ubuntu desktop and Ubuntu server, usually the latest LTS ones, and I clone them as I needed: I need to test some scripts, or the installation of a program, like it was being performed on a real installation.

VirtualBox has this nice little feature of creating clones of your virtual machines, and in no time you are up an running with a clean environment (as long as you remembered to take a snapshots at a good point in time).

The Error

When you clone a virtual machine, you are cloning everything of it, configurations included. And that’s where the problem is. The network will not work at all, and ifconfig will tell you that there is no interface configured.

The Solution

The solutions lies in one file:

/etc/udev/rules.d/70-persistent-net.rules

Open that file with your editor, remove the offending line and reboot.

In this case the offending line is an erroneous “eth*” interface, that will results in multiple network entries in that file when just one is needed. Pay attention to the MAC address of the network interface though.

Source: FULL ARTICLE at Planet Ubuntu

Dual NICs – When I 'ifup eth1' it replaces eth0

By phaedrus

I’ve got an issue with a VMWare server running RHEL 6.3 that has dual E1000 NICs. I have configured the cards as I would normally do in /etc/sysconfig/network-scripts as ifcfg-eth0 and ifcfg-eth1. I can execute ifup eth0 and bring the interface up quite happily, however when I execute ifup eth1 it succeeds but the IP details are assigned to eth0 and eth1 has no IP details as shown below:

Code:

eth0 Link encap:Ethernet HWaddr 00:50:56:XX:XX:XX
inet addr:X.X.X.X Bcast:X.X.X.X Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16073098 errors:0 dropped:0 overruns:0 frame:0
TX packets:12947041 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3523869151 (3.2 GiB) TX bytes:3595458089 (3.3 GiB)

eth1 Link encap:Ethernet HWaddr 00:50:56:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:203710 errors:0 dropped:0 overruns:0 frame:0
TX packets:13025 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14763933 (14.0 MiB) TX bytes:5191322 (4.9 MiB)


I’ve checked /etc/udev/rules.d/70-persistent-net.rules and the MAC addresses match what is in vSphere for the virtual hardware. I can’t find anything else that appears weird or unexpected.

Does anyone have any ideas as to what I might have screwed up here?

Source: FULL ARTICLE at The UNIX and Linux Forums