> For your reference here is the sequence of commands been executed in my
> $ ssh my_user@my_host tar -zcf mytar.tgz my_dirs
> $ scp my_user@my_host:mytar.tgz /tmp/
> $ su root -c "mount -t ext2 -v /dev/hda6 /mnt/part6; sleep 3; mv
> my_partion_dir -v; umount -v /mnt/part6"
> I suppose the problem is while doing su. But i am unable to narrow down
> the same. Hope to get some lights.
The problem is with su. When running su, the standard
input must be a tty (to read the password). su cannot receive
input from a pipe, or redirected file. Also, there is no mention
in the manual about getting the password from a file.