Bug 1257322 - reading computer serial number as non-root user not possible
reading computer serial number as non-root user not possible
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-26 15:26 EDT by René Genz
Modified: 2015-08-27 15:23 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-27 09:06:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Linux Kernel 103601 None None None Never

  None (edit)
Description René Genz 2015-08-26 15:26:06 EDT
Description of problem:
Trying to find out serial number of computer without root permissions.

In the directory:
/sys/devices/virtual/dmi/id

the files:
board_serial
chassis_serial
product_serial

provide that information, but they are not world-readable.
All other files in the directory are world-readable.


How reproducible:
100%

Steps to Reproduce:
1. log in as user to a computer running Fedora 22
2. execute commands in terminal


Actual results:
$ dmidecode -t system | grep -Ei "product|serial|manu"
/dev/mem: Permission denied

$ cat /sys/devices/virtual/dmi/id/{board_serial,chassis_serial,product_serial}
cat: /sys/devices/virtual/dmi/id/...: Permission denied

$ dmidecode -s system-serial-number
/dev/mem: Permission denied


Expected results:
display serial numbers of computer


Additional info:
I am not sure, if sysfsutils is the correct component to file the bug against.
To me this bug shares the same problem: https://bugzilla.redhat.com/show_bug.cgi?id=719611

What is the rational for making the files containing the serial numbers not world-readable?
Alternative solution, that require root permissions for installation of programs are listed at: http://stackoverflow.com/questions/20206474/extract-the-linux-serial-number-without-sudo
Comment 1 Josh Boyer 2015-08-27 09:06:55 EDT
You will need to take this issue directly upstream.  It is working as upstream designed and is not a bug.
Comment 2 René Genz 2015-08-27 15:23:30 EDT
referencing upstream bug report

Note You need to log in before you can comment on or make changes to this bug.