This will actually overwrite the machine.secret
file on the Docker host, not inside the app’s container, as the current shell interprets that redirection. If you want the shell spawned inside the container to interpret it, you’ll have to escape everything and run it through the shell:
$ univention-app shell rocketchat sh -c 'echo "<your new password>" > /etc/machine.secret'
That has the additional advantage of handling the password properly in case it contains any type of shell-specific meta character. Otherwise the following happens:
- The current shell (the one executing
univention-app
) sees"<your new password>"
and does its thing by not interpreting certain characters. - It then removes the
"
before passing that argument to theunivention-app
command. - The
univention-app
command then executes the commandecho <your new password>
(note the missing quotes), and therefore the shell inside the container will act on those special characters.