Bug 1257322 - reading computer serial number as non-root user not possible
Summary: reading computer serial number as non-root user not possible
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-26 19:26 UTC by René Genz
Modified: 2015-08-27 19:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-27 13:06:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Linux Kernel 103601 0 None None None 2019-07-03 14:28:44 UTC

Description René Genz 2015-08-26 19:26:06 UTC
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 13:06:55 UTC
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 19:23:30 UTC
referencing upstream bug report


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