On 16/12/02 14:48 +0530, Anilkumar thus spake: > su euclid -c fetchmail -f /home/euclid/.fetchmailrc > su raj -c fetchmail -f /home/euclid/.fetchmailrc > > it is giving error but when i log in to server with respective users id/pwd > then > give command fetchmail -f /home/euclid/.fetchmailrc it works > > am i giving wrong command in the shell scripts.
Yes. The -c option requires just one parameter. You would have to wrap your complete command in quotes. Thus, this might work. su euclid -c "fetchmail -f /home/euclid/.fetchmailrc" su raj -c "fetchmail -f /home/euclid/.fetchmailrc" You might consider the "-" parameter too, as Suresh suggested, to help get all the environment variables in place for the new user. - Sandip -- -------------------------------------------------------- Sandip Bhattacharya sandipb <@> bigfoot.com http://www.sandipb.net GPG/PGP: 0x08EB637C -------------------------------------------------------- ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
