sudo hangs up if mount code contains a request for a return value (Bash script)
by pizzipie from LinuxQuestions.org on (#5FQAP)
I am running Ubuntu 20.04 with a bash script containing code as below.
If I run this code I enter the sudo password and mount performs fine.
Code:sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=y,ecryptfs_enable_filename_crypto=n rsecure rsecureIf I run this code I enter a sudo password and the command [sudo] password for rick: hangs up. The only difference is the &>mount_ret.txt at the end where I'm trying to see what the return value from mount is.
Code:sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=y,ecryptfs_enable_filename_crypto=n rsecure rsecure &>mount_ret.txt
Anybody have an explanation.
Thanks, R


If I run this code I enter the sudo password and mount performs fine.
Code:sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=y,ecryptfs_enable_filename_crypto=n rsecure rsecureIf I run this code I enter a sudo password and the command [sudo] password for rick: hangs up. The only difference is the &>mount_ret.txt at the end where I'm trying to see what the return value from mount is.
Code:sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=y,ecryptfs_enable_filename_crypto=n rsecure rsecure &>mount_ret.txt
Anybody have an explanation.
Thanks, R