Article 5FQAP sudo hangs up if mount code contains a request for a return value (Bash script)

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, Rlatest?d=yIl2AUoC8zA latest?i=RY65uOJU8T4:cPpMEXR0T44:F7zBnMy latest?i=RY65uOJU8T4:cPpMEXR0T44:V_sGLiP latest?d=qj6IDK7rITs latest?i=RY65uOJU8T4:cPpMEXR0T44:gIN9vFwRY65uOJU8T4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments