Skip to content

Password Files

Passfiles

What is a magmapassfile?

A magmapassfile is required before Magma can run on a machine. To obtain a magmapassfile for your computer, you must send us your MAC address as plain text. We shall reply with an e-mail containing lines such as these:

20756086455966814011423625867371812342158442332608349424623140533790046958
28602435385975314370052078838043700436679135290161620294137039097759295707

Each line of approximately 75 digits is a code, and in combination these codes encode information about the provided MAC address(es). You need to copy-and-paste these codes into a file called magmapassfile in your Magma installation directory. Please ensure that no white space is introduced into or removed from the passfile.

Creating a magmapassfile (OSX)
  1. Open TextEdit from Applications folder
  2. Copy-and-paste the codes into a new document
  3. From the Format menu, choose "Make Plain Text"
  4. Select "Save As..." from the File menu
  5. Important: Enter the name magmapassfile (without quotes) and delete any .txt suffix
  6. Save the file and copy it to your Magma installation folder (Applications/Magma)

Important: Take care to avoid inserting any extra line breaks or spaces.

Creating a magmapassfile (Linux)
  1. cd into your Magma installation directory
  2. Create the file using a text editor: vi magmapassfile
  3. Paste your codes into the document (one line per code)
  4. Save and exit
  5. Make sure the file is readable: chmod +r magmapassfile

Important: Take care to avoid inserting any extra line breaks or spaces.

Advanced configuration for magmapassfiles

On UNIX systems (including Mac OS X) you can specify the name and location of your magmapassfile via the MAGMAPASSFILE environment variable.

This is set in your magma script. The default configuration is:

if [ "$MAGMAPASSFILE" = "" ]; then
    export MAGMAPASSFILE="${ROOT}/magmapassfile"
fi

You can edit this file directly, or export the location of your magmapassfile before launching Magma.

MAC address

What is a MAC address?

First note that a MAC address has nothing to do with Mac OS X or Macintosh computers. It is an abbreviation of "Media Access Control" and is supported by all modern computer hardware.

A MAC address is an essentially unique number associated with a network card in a machine; it serves as a convenient way to distinguish between two different computers. A MAC address consists of 48 bits, usually represented as a string of 12 hexadecimal digits (0 to 9, a to f, or A to F); these are often grouped into pairs separated by colons or dashes. For example, the MAC address 001B638445E6 may be given as 00:1b:63:84:45:e6 or as 00-1B-63-84-45-E6.

Why does Magma need a MAC address?

The MAC address is used to generate the magmapassfile, so that Magma will run on the appropriate machine.

Determining a MAC address on Mac OS X

Open a terminal window and type:

networksetup -listallhardwareports | awk '/^Ethernet/ {print $3}' | awk '!(/.[26aeAE][-:]..[-:]..[-:]..[-:]..[-:]../) {print $1}'

This will print only the MAC addresses that are not private or rotated.

38:c9:86:41:53:41

28:f0:76:40:4d:c0

Determining a MAC address on Linux

Open a terminal window and type:

/sbin/ifconfig -a

This command will print information on all networks in the system. Look for a line like:

eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX

The XX:XX:XX:XX:XX:XX part is the MAC address.

Alternatively, our simple Linux program can be used to determine the MAC address:

Download it to your current directory and run:

chmod a+rx macaddr
./macaddr

This will print the MAC address and hostname. For example:

00:1b:63:84:45:e6 [fano]

Mail the output of this program to us as plain text and we will reply with your magmapassfile.

Determining a MAC address using WSL

Follow the instructions for Linux above in a Linux shell within WSL rather than in a Windows terminal.

To ensure that the MAC address is fixed rather than rotating, restart the machine and check whether the MAC address in WSL is the same as before. In the file /etc/wsl.conf put the line

command=sudo ip link add bond0 address MY:MA:CA:DD:RE:SS type bond
or
[boot]
command=/bin/sh -c '/usr/sbin/ip link set dev eth0 down; /usr/sbin/ip link set dev eth0 address MY:MA:CA:DD:RE:SS; /usr/sbin/ip link set dev eth0 up'

where MY:MA:CA:DD:RE:SS is the address which was or will be used to create the magmapassfile. Restart Linux. Having this in the config file runs it automatically at each Linux startup.

Alternatively, after starting Linux, run the commands

sudo ip link set dev eth0 down
sudo ip link set dev eth0 address MY:MA:CA:DD:RE:SS
sudo ip link set dev eth0 up

Magma can report a MAC address

If you have followed the steps above and still been unable to determine your machine's MAC address, you can always get Magma itself to tell you what MAC address your machine has.

When you try to start Magma without an appropriate magmapassfile, it should print an error message and exit. Part of this message will be the MAC address(es) that it detected for your machine. Any one of these should work.

Note: You will have to run Magma from a shell or command window in order to see this message. Otherwise the window will close before you have time to read it!

The drawback of this approach is that you will then have to send us your MAC address and wait for the magmapassfile to be generated.

I have more than one MAC address. Which one should I use?

Any should work, as long as it is nonzero. As a general rule it is best to use the first one outputted by the methods above.

Sending a MAC address

You can include it with your subscription request, or simply email it to us as plain text.

Accepted forms of MAC addresses

The passfile generation expects the MAC address to be specified in one of a few ways. The MAC address must be specified using hexadecimal digits (0 to 9 or A to F), possibly with separators between them. The formats understood are:

  • Exactly twelve hexadecimal digits: XXXXXXXXXXXX, e.g. 001B638445E6
  • Six components separated by colons or dashes: Y:Y:Y:Y:Y:Y or Y-Y-Y-Y-Y-Y, e.g.
  • 00:1b:63:84:45:e6
  • 00-1B-63-84-45-E6

Note that it doesn't matter whether lower case or upper case letters are used, and when separators are used a leading zero may be omitted from any component.

When a MAC address changes

See What issues can be caused by upgrading the operating system?

Send us the new MAC address and we will send you an updated magmapassfile for use with your new hardware configuration.