Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #269308
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: How to run automatically a script as soon root login |
| Date | 2024-05-13 21:10 +0200 |
| Message-ID | <IDJdE-d88c-7@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> <IDGpr-d6i9-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 13, 2024 at 06:06:37PM +0200, Hans wrote: > Am Montag, 13. Mai 2024, 13:24:17 CEST schrieb Greg Wooledge: > > On Mon, May 13, 2024 at 07:36:07AM +0200, Richard wrote: > > > .profile > > Sorry, dumb question: Depending of the shell, the user is using (let's say, he > will use bash), can the script not be added into ~/.bashrc? The context has been snipped out. The context for this was "OP is trying to run a command when root logs in". The method of login was not stated. First responder said ".profile works for every method of login". I said that this is incorrect: it doesn't work for many GUI login setups. In those same GUI login setups, .bashrc is *also* not read when the user logs in. None of the shell startup files are read at all. All of this is a tangent to the actual problem, though. > If yes, second dumb question: Coiuld it be ANY script or command? > (also running as non-rootuser, like adding "runuser -u myuser > command_whatever"). We're several layers deep into an X-Y problem here. The *actual* problem is that the system's networking configuration is not correct/complete. The *workaround* is that the OP is logging in and running commands to change the networking configuration temporarily. The question resulting from the workaround (the Y in the X-Y) was "How can I automate these commands that I keep having to type?" The proper question should have been "How can I fix my system's networking configuration permanently?"
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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