From: Quentin Young Date: Thu, 7 Nov 2019 22:59:13 +0000 (+0000) Subject: vtysh: be helpful and kind to unprivileged users X-Git-Tag: base_7.3~185^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1427547595bf4e9e64ad2c92c9eade27f5af8c26;p=matthieu%2Ffrr.git vtysh: be helpful and kind to unprivileged users Signed-off-by: Quentin Young --- diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index d536263db0..c7e1d252c7 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -535,6 +535,9 @@ int main(int argc, char **argv, char **env) /* Do not connect until we have passed authentication. */ if (vtysh_connect_all(daemon_name) <= 0) { fprintf(stderr, "Exiting: failed to connect to any daemons.\n"); + if (geteuid() != 0) + fprintf(stderr, + "Hint: if this seems wrong, try running me as a privileged user!\n"); if (no_error) exit(0); else