Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A shell script to get machine serial numbers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell script to get machine serial numbers
Authored by: raveldcp on Apr 05, '04 12:46:15PM

Two comments:

1. Most of the data can be retrieved from ioreg, and ioreg is much faster.
2. FTP is a known security hole, use mail -s "file" < serial.txt and you can have the file mailed to you without turning on ftp.



[ Reply to This | # ]
ioreg - SSH
Authored by: ssevenup on Apr 05, '04 03:22:30PM
OK, so something like this...

ioreg -c "IOPlatformExpertDevice" | awk '/IOPlatformSerialNumber/ {print $4}'

And yup, SSH or anything pretty much would be preferred over ftp :-(

---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.

[ Reply to This | # ]

ioreg - SSH
Authored by: mtalbot on Jan 19, '07 11:26:17PM
To return the serial number without the quote marks, set the field separator (-F '"') in the last awk command...
ioreg -c "IOPlatformExpertDevice" | awk -F '"' '/IOPlatformSerialNumber/ {print $4}'


[ Reply to This | # ]
A shell script to get machine serial numbers
Authored by: adamjacobmuller on Apr 15, '04 10:37:00PM

ftp is considered insecure because it transmits all information in cleartext, but so does mail, so if your concerned at all about the privacy of such data don't use ftp OR mail
mail does work around the fact that your not sending a system username and password to connect to an ftp server but it still transmits the data in cleartext
use ssh or scp



[ Reply to This | # ]