Bug 1257322

Summary: reading computer serial number as non-root user not possible
Product: [Fedora] Fedora Reporter: René Genz <liebundartig>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab, pholasek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-27 13:06:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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