The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 10-08-2008
avronius avronius is offline VIP Member  
VIP Member
  
 

Join Date: Apr 2008
Location: Calgary
Posts: 305
can you do this as user mbaker:


Code:
for host in `cat hostlist`; do ssh $host sudo -u root ifconfig -a;done
without being asked for a password? (In Solaris, only root can see MAC address - it's a harmless test).

Depending on how your systems are config'd, you may be able to sudo without providing a password. If you DO need a password to do the sudo, you could add some scripting magic to wait and apply the password, but it's not terribly secure...