LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2011, 06:49 AM   #1
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Rep: Reputation: 0
Get main board product name without sudo


Hi,

I have found two ways to get the main board product name:
  1. sudo lshw
  2. sudo dmidecode
Is it the nature of this info that's making it protected or is it the source code of these tools?

Is there any way to get main board product name without sudo?

Cheers

Prashant

Last edited by tank junior; 05-10-2011 at 06:55 AM.
 
Old 05-10-2011, 07:20 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by tank junior View Post
Is it the nature of this info that's making it protected or is it the source code of these tools?
These tools lshw and dmidecode have source that is freely available.

The issue is that the information is being gathered using access to real memory (for example, from BIOS tables). Since having direct access to memory allows access to the whole system, it cannot be granted openly to user applications.

It is true that some of the information is not security critical, and in theory it could be made available to user programs (eg either by granting limited memory access rights, or indirectly through /proc). But in most cases anyone able to make use of this information has full access to the machine anyway.
 
Old 05-10-2011, 07:53 AM   #3
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
Thanks neonsignal,

Shall I start digging inside the source code of these tools to check if I could retrieve the baseboard product name without sudo or is there any other alternative.

In any case if this particular piece of info needs some kind of rights then I'll drop the idea of using it.

Prashant
 
Old 05-10-2011, 08:30 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by tank junior View Post
Shall I start digging inside the source code of these tools to check if I could retrieve the baseboard product name without sudo
No point, they probably just access /dev/mem.

I don't know of another way of getting this information from a non-privileged application. You can run lshw without sudo, and it will report as much as it can, but not the motherboard info from the BIOS.
 
Old 05-10-2011, 08:45 AM   #5
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
Thanks neonsignal,

I am relatively new in linux world. I don't know if it's common or restricted that when you install either open source or commercial apps and you have to assign some rights to their executable so that they can access private info, provided source of app is authenticated.

Prashant
 
Old 05-10-2011, 09:02 AM   #6
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by tank junior View Post
I don't know if it's common or restricted that when you install either open source or commercial apps and you have to assign some rights to their executable so that they can access private info, provided source of app is authenticated.
No, it isn't. For applications that come from a standard repository (eg the repository of the particular distribution), the installation process itself will normal take care of any access that is required. Some larger applications (such as a web server) may require some additional configuration, but most will work 'out of the box'. The bulk of applications simply operate at the user's privilege level.

For third party applications, installation can sometimes be a little more complex, since it may not be customized for the particular distribution.

If you find that an application does not have the access that you want, there is usually a good security reason for it. So although it is relatively easy in Linux to increase the privileges of an executable, it should only be done with great caution (and rarely if ever). Even if the application is known to be trustworthy, does not mean that you want it to have system wide access, since an untrusted user might misuse the application as a means of cracking the system (this is true whatever operating system you are running).

Last edited by neonsignal; 05-10-2011 at 09:03 AM.
 
  


Reply

Tags
motherboard



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tiny PCs use pico-ITX main board LXer Syndicated Linux News 0 11-29-2007 07:40 AM
LXer: rPath Hires New Vice President of Product Development; Founding Engineer Elected to Board of Software Conservancy LXer Syndicated Linux News 0 06-15-2006 09:33 AM
New Main Board and HDD mr1nonly Linux - Newbie 4 02-02-2006 07:56 PM
Main board repleacment dlc2000 Linux - Hardware 1 05-18-2004 11:21 AM
Help with RedHat 7.1 Install on /sbin/loader with an M748LMRT Main Board... cure_me Linux - Software 3 10-27-2001 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration