Hi!
From what it looks to me you should consider using sudo for your task. There you can allow in a very detailed way certain commands to be executed without giving a password. Hardcoding the root password into a script as you try seems to me very risky...
- Martin
On Wed, 3 Nov 2004, STEPHANE DURIEUX wrote:
Hi,
I have made a short script with the su command within I have tried : echo -ne "password\n"|su - root But it gives me the following message. su : must be run from a terminal Have you any idea
Thanks
Stephane Durieux
Vous manquez d’espace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com