Read a Compaq Ownership Tag with ownership
You will check whether this machine exposes a Compaq ownership tag and capture the raw value without adding labels or other text. The installed command is ownership from the dmidecode 3.5 package. Allow about five minutes. You need a shell, the package installed, and usually elevated access to the memory device. The command only reads the selected device; it does not write a tag or change firmware.
The route
Jump straight to the step you need, or tick off Done means at the end.
1. Confirm the installed command
Start with checks that do not read hardware memory:
$ command -v ownership
/usr/sbin/ownership
$ ownership --version
3.5
$ ownership --help
Usage: ownership [OPTIONS]
Options are:
-d, --dev-mem FILE Read memory from FILE (default: /dev/mem)
-h, --help Display this help text and exit
-V, --version Display the version and exit
The exact help text can vary slightly between package builds. The useful checks are the executable path, a version response, and the three documented options. On this host, --version and --help both exit successfully.
Checkpoint
If command -v ownership prints nothing, stop here. Install or repair the dmidecode package through your normal operating system process, then repeat this step. Do not download an unrelated program with the same name.
2. Understand what the normal run reads
Run ownership with no options when you are ready to inspect the machine:
$ sudo ownership
<raw ownership tag, if one is present>
The manual specifies /dev/mem as the default input. sudo is shown because access to that device is commonly restricted; use it only if an unprivileged run fails with a permission error and your local policy permits it. The command does not print a field name, explanatory prefix, or version during a normal read. That makes the output suitable for a script, but it also means an empty result has little context by itself.
Capture standard output in a new file if you need an audit record. Keep the diagnostic stream visible:
$ sudo ownership > ownership-tag.txt
$ status=$?
$ printf 'ownership exit status: %s\n' "$status"
ownership exit status: 0
An exit status of zero means the read completed according to the program. It does not prove that the tag is present, current, or trustworthy. Inspect the captured file without adding a newline or interpreting bytes as a shell command:
$ wc -c ownership-tag.txt
$ od -An -tx1 -c ownership-tag.txt
wc distinguishes an empty result from a non-empty one. od is useful when the tag contains spaces, control characters, or a trailing byte that is not obvious in a terminal. Treat the output as hardware-supplied data, not as a command to execute.
3. Use an alternate memory device only deliberately
The -d or --dev-mem option selects a different input file:
$ sudo ownership --dev-mem /dev/mem
<raw ownership tag, if one is present>
Passing the default explicitly is useful when reviewing a script or comparing command lines. It does not make the read safer or bypass permissions. Do not substitute an arbitrary regular file and call the result a hardware check. The file must provide the memory view expected by this old Compaq-specific reader.
Before using a non-default path, inspect it without changing it:
$ stat -c '%A %U:%G %t:%T %n' /path/to/memory-device
$ test -r /path/to/memory-device
$ printf 'readable status: %s\n' "$?"
This is an ordinary read-only check. Elevated privilege is only needed for stat or test if the directory permissions hide the device entry. Do not create a replacement device node, change permissions, or grant broad access just to make ownership run.
4. Separate a missing tag from a failed read
Keep the command's status and diagnostic output separate. A failed read should not be treated as an empty ownership tag:
$ tmp_tag=$(mktemp)
$ if sudo ownership >"$tmp_tag"; then
> printf 'read completed, bytes: '
> wc -c <"$tmp_tag"
> else
> status=$?
> printf 'ownership could not read the device, status %s\n' "$status" >&2
> fi
$ rm -- "$tmp_tag"
The temporary file is removed at the end. If the read reports a permission problem, check the device permissions and your approved privilege path. If it reports an end-of-file or another device error, the selected input is not providing the expected memory contents. For example, running against /dev/null is a safe negative test, but it returns an error rather than a tag because it has no memory data.
Older or non-Compaq systems may have no ownership tag at all. The tool is not a general asset-inventory command and does not convert a modern SMBIOS asset tag into this legacy format. Use dmidecode separately for DMI data when that is what your hardware and inventory process require.
5. Protect the captured value
An ownership tag can identify a machine or an organisation. Store the file only where the people responsible for the inventory can read it, and avoid pasting the raw value into public issue trackers or shell transcripts. The command itself does not encrypt, redact, or validate the tag.
If the command overwrote an existing capture because you used >, that previous file cannot be recovered by ownership. For a replacement workflow, write to a new path first and compare it before moving it into place:
$ sudo ownership > ownership-tag.txt.new
$ cmp -- ownership-tag.txt ownership-tag.txt.new
$ mv -- ownership-tag.txt.new ownership-tag.txt
If the comparison fails, inspect both files before replacing the old record. If the new read fails, remove only ownership-tag.txt.new; the original capture remains untouched.
Done means
ownership --versionidentifies the installed dmidecode build.- The normal read uses
/dev/mem, with elevation only when device permissions require it. - The raw output is captured and checked for length without being executed.
- A failed read is kept distinct from an empty or absent Compaq ownership tag.
- No device permissions, firmware values, or memory contents were changed.