Hello,
On Tue, Oct 01, 2024 at 11:08:19AM -0000, Chupin Maxime via Mailman-users wrote:
root@machine: sudo -u list bash
If you are root already, you could also use su:
su - -u list -s /bin/bash -c "mailman-web makemigrations --merge"
(the -s /bin/bash is because the list account has a /usr/sbin/nologin shell in /etc/passwd)
Also note that Debian has a wrapper for mailman commands (but not mailman-web commands), for example:
root@ds-services-mailman:~# mailman-wrapper version GNU Mailman 3.3.8 (Tom Sawyer)
This wrapper, when run from root (sudo mailman-wrapper or just mailman-wrapper under the root user) changes the user to the list user:
root@ds-services-mailman:~# cat $(which mailman-wrapper) #!/bin/sh
su -s /bin/sh -c "mailman $*" list
Not very different from my su above.