CLI : script to insert alias on user accunt with CLI

Hi,

I try to insert mostly alias e-mail automatically by a script for one user used

  yunohost user update <username> -add-mailalias <e-mail>

in a file I have the list of e-mail and avatar to add

my issue is link with the password, the password are ask each time.
how to insert automatically the admin yunohost password, for each action.

Thanks in Advence for your answer.

Best

Hi @astroflo,

There’s an option, probably --admin-password, which allows to specify the admin password when running a YunoHost command. (You can see it when running yunohost --help)

Be aware though, that when doing this, the full command will appear in commands like ps -ef. Therefore a malicious user on the machine that would be monitor ps -ef could be able to grab the admin password and gain access…