Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I have found two ways to get the main board product name: [sudo lshw] [sudo dmidecode] Is it the nature of this info that's making it protected or is ...
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5

    Get main board product name without sudo

    Hi,

    I have found two ways to get the main board product name:

    1. [sudo lshw]
      [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? Shall I dig inside the source code of these tools?

    Prashant

  2. #2
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,942
    The mainboard info is located in the root account of file system. So Admin only has the right to access that info. Hence sudo, su, with a password to get that info from root file system. Once you access that info. You can copy and paste it to text file and save the text in /home where users can have access without using sudo.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    If you want to take the security risk, you can enable the setuid bit on these applications (as root):
    Code:
    chmod +s /usr/sbin/dmidecode
    On my system, lshw is executable by regular users without sudo. It is also in /usr/sbin, so most users may need to either execute it via the full path /usr/sbin/lshw, or add /usr/sbin to their PATH environment.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...