Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269273

Re: How to run automatically a script as soon root login

From Erwan David <erwan@rail.eu.org>
Newsgroups linux.debian.user
Subject Re: How to run automatically a script as soon root login
Date 2024-05-13 14:00 +0200
Message-ID <IDCvv-d3Lq-9@gated-at.bofh.it> (permalink)
References <IDpoB-cVxq-1@gated-at.bofh.it> <IDwzL-d02T-1@gated-at.bofh.it> <IDC2t-d3BB-1@gated-at.bofh.it> <IDClP-d3If-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Le 13/05/2024 à 13:48, Mario Marietto a écrit :
> --> If they only want this thing to happen when root logs in directly 
> on a console or ssh, then .profile may indeed be the correct answer.
>
> Yes,I don't need to run xorg and a desktop environment,since warp-cli 
> disconnect and warp-cli connect do not require them.
> I wouldn't to login as root automatically,but I've realized that this 
> command :
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> work only if I'm root. It does not work using sudo. So,in the end I've 
> chosen to be root instead of a normal user that can use sudo.
>
>

For this it is sufficient to  use /etc/sysctl.conf

You find in the file shipped by debian


# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

So you just have to uncomment and it will be done at boot time.


(You have the ipv6 equivalent in the same file, if needed)


-- 
Erwan David

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-13 13:30 +0200
  Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 13:50 +0200
    Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-13 14:00 +0200
    Re: How to run automatically a script as soon root login Erwan David <erwan@rail.eu.org> - 2024-05-13 14:00 +0200
    Re: How to run automatically a script as soon root login Nicolas George <george@nsup.org> - 2024-05-13 14:10 +0200
      Re: How to run automatically a script as soon root login Stefan Monnier <monnier@iro.umontreal.ca> - 2024-05-13 15:50 +0200
        Re: How to run automatically a script as soon root login Stefan Monnier <monnier@iro.umontreal.ca> - 2024-05-13 16:20 +0200
          Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 17:30 +0200
            Re: How to run automatically a script as soon root login Richmond <dnomhcir@gmx.com> - 2024-05-13 18:50 +0200
    Re: How to run automatically a script as soon root login Stefan Monnier <monnier@iro.umontreal.ca> - 2024-05-13 14:10 +0200
    Re: How to run automatically a script as soon root login Nicolas George <george@nsup.org> - 2024-05-13 14:20 +0200
      Re: How to run automatically a script as soon root login Erwan David <erwan@rail.eu.org> - 2024-05-13 14:50 +0200
        Re: How to run automatically a script as soon root login Richmond <dnomhcir@gmx.com> - 2024-05-13 15:20 +0200
          Re: How to run automatically a script as soon root login Erwan David <erwan@rail.eu.org> - 2024-05-13 15:20 +0200
          Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-13 15:20 +0200
            Re: How to run automatically a script as soon root login <tomas@tuxteam.de> - 2024-05-13 15:30 +0200
              Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 19:10 +0200
      Re: How to run automatically a script as soon root login <tomas@tuxteam.de> - 2024-05-13 14:50 +0200
        Re: How to run automatically a script as soon root login <tomas@tuxteam.de> - 2024-05-13 15:00 +0200
          Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 15:20 +0200
            Re: How to run automatically a script as soon root login Nicolas George <george@nsup.org> - 2024-05-13 15:30 +0200
              Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 16:00 +0200
        Re: How to run automatically a script as soon root login Nicolas George <george@nsup.org> - 2024-05-13 15:00 +0200
        Re: How to run automatically a script as soon root login Nicolas George <george@nsup.org> - 2024-05-13 15:20 +0200
        Re: How to run automatically a script as soon root login Richmond <dnomhcir@gmx.com> - 2024-05-13 15:20 +0200
      Re: How to run automatically a script as soon root login Richmond <dnomhcir@gmx.com> - 2024-05-13 14:50 +0200
        Re: How to run automatically a script as soon root login Dan Ritter <dsr@randomstring.org> - 2024-05-13 15:10 +0200
    Re: How to run automatically a script as soon root login Dan Ritter <dsr@randomstring.org> - 2024-05-13 14:20 +0200
  Re: How to run automatically a script as soon root login Hans <hans.ullrich@loop.de> - 2024-05-13 18:10 +0200
    Re: How to run automatically a script as soon root login <tomas@tuxteam.de> - 2024-05-13 18:40 +0200
      Re: How to run automatically a script as soon root login Richard <rrosner5@gmail.com> - 2024-05-13 19:10 +0200
    Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-13 21:10 +0200
      Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 21:20 +0200
        Re: How to run automatically a script as soon root login David Wright <deblis@lionunicorn.co.uk> - 2024-05-13 22:00 +0200
          Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-13 22:10 +0200

csiph-web