PDA

View Full Version : lshal not in Fedora 16?



lhouk
12th March 2012, 07:59 PM
Under Fedora 14, I used to be able to run
lshal | grep 'system.hardware.vendor' to determine a system's manufacturer and
lshal | grep 'system.hardware.product' to determine it's model. Under Fedora 16, the "lshal" command doesn't seem to exist. Has it been removed, and if so, is there another command that has replaced it? Thanks in advance to all who respond.

DBelton
12th March 2012, 11:17 PM
lshal was a utility for listing the devices in the hal database.. Since Fedora no longer uses hal, then lshal would be useless even if it was included.

You can use lspci or lsusb. There is also a lshw program.

lhouk
13th March 2012, 03:04 PM
Thanks for the prompt response. I was aware of "lspci" and "lsusb", but neither returned the two values I mentioned in my original post. I was not aware of "lshw", and after I installed it, the command
lshw -class system does in fact list the manufacturer and vendor, but only if the command is run as root, otherwise it just lists "description: Computer". So, I'm halfway there, but is there a way I can get the information even if I'm not root, as "lshal" used to provide? Any suggestions would be gratefully appreciated.

stevea
13th March 2012, 03:53 PM
NO - you need root privileges to see that level of detail. lshw tries to open /dev/mem, dev/sd* and others as root.

dmidecode may give the same strings, but you still need to have privilege.

You can (IIRC) install and run hald in F16, but my guess is that you will no longer get the expansive list.

lhouk
15th March 2012, 10:44 PM
Well, I've been giving it some thought, and the only solution I've come up with is to set the sticky bit on /usr/sbin/lshw. That way anyone can run it with root permissions, and it gives me the information I need. It's a bit of a security risk, but I don't see any other way. Thanks to DBelton and stevea for their help.

jpollard
15th March 2012, 10:52 PM
You could use sudo to do that instead.

The advantage is that poblems in the application can be insulated by defining exactly the command+options to be used, and permit no other. It can also be used to avoid those tests that might cause problems to the system.