简体   繁体   中英

remounting file system as rw in unix bash script

Hi all I need to remount a file system as read/write in a bash script

I've looked at several examples and my code looks right..in fact its working. However when I execute the bash file as root it still asks to enter a password. I can't do this as it is going to be run as a CRON job when I'm out of the office. I've tried several variations and none work. Do you guys have any suggestions?

$MOUNT -o remount,rw $BACKUPDIR ;
if (( $? )); then
{
$ECHO "snapshot: could not remount $BACKUPDIR readwrite";
exit;
}

fi;

您可以在命令行中指定密码:

-o remount,rw,pass=password

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM