Re: Admin Root user [not set to default]

2025-04-10 Thread Joe
uld be grateful if someone could explain why admin root user is > not set to default. I have always had user login and password and then > root for for other tasks like Aptitude updates. [I am a fan of > Aptitude although most folk seem to prefer Apt]. > > Also not sure where to set root

Re: Admin Root user [not set to default]

2025-04-10 Thread Greg Wooledge
w included sudo. It may > be that the Calamares installer has decided this setup and it is > better to use the netinst iso. If you install using the regular Debian installer, you will be given the opportunity to enter a root password, or to leave it blank. If you give a root password, then that

Re: Admin Root user [not set to default]

2025-04-10 Thread tomas
On Wed, Apr 09, 2025 at 09:34:08AM -0400, Jeffrey Walton wrote: [...] > Disabling root logins by default is especially important when a > network attacker can use the login, like via SSH. To achieve this... > The network attacker >

Re: Admin Root user [not set to default]

2025-04-09 Thread Greg Wooledge
On Wed, Apr 09, 2025 at 09:34:08 -0400, Jeffrey Walton wrote: > Disabling root logins by default is especially important when a > network attacker can use the login, like via SSH. The network attacker > is usually your #1 threat, There may be systems where this is true; for example, a p

Re: Admin Root user [not set to default]

2025-04-09 Thread Joe
al times I have needed to install it, along with mc, as the first tasks in a new stable installation. It's really useful in a multi-user system, where individual users or groups of users can be allowed to do some specific tasks using their own passwords, or even with no password. Su is all or nothing:

Re: Admin Root user [not set to default]

2025-04-09 Thread Nicolas George
nient if you want to run several > commands as root instead of just one. Not true: with a root shell, you need to be extra careful at all time. With sudo in front of the privileged commands, you only need to be extra careful when you type sudo. Regards, -- Nicolas George

Re: Admin Root user [not set to default]

2025-04-09 Thread Jani Heikkinen
go with. I would be grateful if someone could explain why admin root user is not set to default. I have always had user login and password and then root for for other tasks like Aptitude updates. [I am a fan of Aptitude although most folk seem to prefer Apt]. Also not sure where to set root admi

Re: Admin Root user [not set to default]

2025-04-09 Thread Jeffrey Walton
could explain why admin root user is > not set to default. I have always had user login and password and then > root for for other tasks like Aptitude updates. [I am a fan of > Aptitude although most folk seem to prefer Apt]. To answer this question, root login is generally discouraged i

Re: Admin Root user [not set to default]

2025-04-09 Thread James Freer
a "Live" medium instead of the real installer? [a] > > Anyway, the Live version doesn't set a root password, and doesn't > give you the chance to set one during installation. [b] It just assumes > you will want to use sudo for everything. But don't worry about th

Re: Admin Root user [not set to default]

2025-04-09 Thread Greg Wooledge
On Wed, Apr 09, 2025 at 10:50:54 +0100, James Freer wrote: > I've just done my install of Debian 12 Live XFCE version. I really don't understand why so many people do this. Why would you install using a "Live" medium instead of the real installer? Anyway, the Live ver

Re: Admin Root user [not set to default]

2025-04-09 Thread Henrik Ahlgren
James Freer writes: > I would be grateful if someone could explain why admin root user is > not set to default. I have always had user login and password and then > root for for other tasks like Aptitude updates. [I am a fan of > Aptitude although most folk seem to prefer Apt]. >

Re: Admin Root user [not set to default]

2025-04-09 Thread debian-user
James Freer wrote: > Hi members > > I've just done my install of Debian 12 Live XFCE version. Been a user > of Xubuntu for 15 years and thought i would change. Tried some of the > derivatives and chose Debian to go with. > > I would be grateful if someone could expl

Admin Root user [not set to default]

2025-04-09 Thread James Freer
Hi members I've just done my install of Debian 12 Live XFCE version. Been a user of Xubuntu for 15 years and thought i would change. Tried some of the derivatives and chose Debian to go with. I would be grateful if someone could explain why admin root user is not set to default. I have a

ssh root login (was: Debian 12.9 and use of sudo for regular accounts)

2025-02-21 Thread Frank Guthausen
On Fri, 21 Feb 2025 13:17:21 +0800 jeremy ardley wrote: > > Logging in as root on a server is highly dangerous, especially if it > has an internet facing ssh port. There is an approach which might be helpful here and there: spawn a second ssh daemon with root login and bind n

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-06 Thread Timothy M Butterworth
On Wed, Feb 5, 2025 at 8:57 PM K0LNY ?? wrote: > Hi Andrew, > Using other distros, like Ubuntu and Raspbian, I would get tired of typing > sudo in front of everything, so I would just do sudo su and become root > for > everything, You do not need to do sudo su, you can just ty

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Chris Green
K0LNY ?? wrote: > Hi Andrew, > Using other distros, like Ubuntu and Raspbian, I would get tired of typing > sudo in front of everything, so I would just do sudo su and become root for > everything, so I wouldn't have to constantly be reminded that as a regular > user, I can

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Max Nikulin
(debian-accessibil...@lists.debian.org is dropped from Cc:) On 06/02/2025 06:29, Jeffrey Walton wrote: With respect to other operating systems, like Solaris, root is a role, not a user. Jeffrey, it is interesting topic to discuss, but I am afraid, this stuff and SELinux may confuse K0LNY

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Jeffrey Walton
; > installing things as root? > > I know that there are issues if some packages are installed with root > > privileges on other systems. > > Thanks. > > I'm not quite sure I understand what you mean here. Root can do most things: > sudo is effectively allowing an

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Andrew M.A. Cater
On Wed, Feb 05, 2025 at 01:38:17PM -0600, K0LNY ?? wrote: > Hi Andrew, > Using other distros, like Ubuntu and Raspbian, I would get tired of typing > sudo in front of everything, so I would just do sudo su and become root for > everything, so I wouldn't have to constantly be r

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Dan Ritter
K0LNY ?? wrote: > Using other distros, like Ubuntu and Raspbian, I would get tired of typing > sudo in front of everything, so I would just do sudo su and become root for > everything, so I wouldn't have to constantly be reminded that as a regular > user, I can't do som

Re: Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread K0LNY ??
Hi Andrew, Using other distros, like Ubuntu and Raspbian, I would get tired of typing sudo in front of everything, so I would just do sudo su and become root for everything, so I wouldn't have to constantly be reminded that as a regular user, I can't do something, and I had been

Root, sudo and installing packages [WAS Re: user is not in the suder's file]

2025-02-05 Thread Andrew M.A. Cater
[Follow-up suggested to the mailing list at debian-user@lists.debian.org] On Wed, Feb 05, 2025 at 11:50:44AM -0600, K0LNY ?? wrote: > Hi Andrew, > How is Debian different with regard to apparently there not being a problem > installing things as root? > I know that there are is

Re: If one sets 'Defaults rootpw' in sudoers but no root password is it disaster?

2024-10-16 Thread Chris Green
Chris Green wrote: > Dan Ritter wrote: > > Chris Green wrote: > > > I'd like to force a different password from my own password when I do > > > 'sudo -i' to get root privilege. However I'm a bit frightened about > > > what might h

Re: If one sets 'Defaults rootpw' in sudoers but no root password is it disaster?

2024-10-16 Thread Chris Green
Dan Ritter wrote: > Chris Green wrote: > > I'd like to force a different password from my own password when I do > > 'sudo -i' to get root privilege. However I'm a bit frightened about > > what might happen if I set 'Defaults rootpw' in the su

Re: If one sets 'Defaults rootpw' in sudoers but no root password is it disaster?

2024-10-15 Thread Dan Ritter
Chris Green wrote: > I'd like to force a different password from my own password when I do > 'sudo -i' to get root privilege. However I'm a bit frightened about > what might happen if I set 'Defaults rootpw' in the sudoers file but > forget to actually c

Re: If one sets 'Defaults rootpw' in sudoers but no root password is it disaster?

2024-10-15 Thread Roland Müller
I am to tired to test this now - but I guess as prerequisite you should then give the root user a password.  A long time ago I was "providing" root with a password in some Debian or Ubuntu system using 'passwd'. sudo should not cope with an undefined root password, a

If one sets 'Defaults rootpw' in sudoers but no root password is it disaster?

2024-10-15 Thread Chris Green
I'd like to force a different password from my own password when I do 'sudo -i' to get root privilege. However I'm a bit frightened about what might happen if I set 'Defaults rootpw' in the sudoers file but forget to actually create a root password. (This is on sy

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-08 Thread Roger Price
On Mon, 7 Oct 2024, Bruno Schneider wrote: On Sun, Oct 6, 2024 at 10:51 AM Roger Price wrote: I logged out and back in. Command "sudo /usr/sbin/synaptic" called for my own password, and now works correctly. It is unclear if the Synaptic desktop icon is now working for you. The desktop icon

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-07 Thread Max Nikulin
On 06/10/2024 16:47, Joe wrote: My graphical menu calls synaptic-pkexec, and it definitely wants the root password, and it says so explicitly. My impression is that polkit dialog appearance depends on desktop environment. In KDE it is more confusing since it contains no hint if user or root

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-07 Thread Peter Hillier-Brook
On 07/10/2024 15:07, Bruno Schneider wrote: On Sun, Oct 6, 2024 at 10:51 AM Roger Price wrote: I logged out and back in. Command "sudo /usr/sbin/synaptic" called for my own password, and now works correctly. It is unclear if the Synaptic desktop icon is now working for you. I'm using a rec

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-07 Thread Bruno Schneider
On Sun, Oct 6, 2024 at 10:51 AM Roger Price wrote: > > I logged out and back in. Command "sudo /usr/sbin/synaptic" called for my own > password, and now works correctly. > It is unclear if the Synaptic desktop icon is now working for you. I'm using a recent install of Debian 13 (testing) and I r

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Greg Wooledge
On Sun, Oct 06, 2024 at 15:50:59 +0200, Roger Price wrote: > On Sun, 6 Oct 2024, Greg Wooledge wrote: > > Run the "id" command with no arguments to see your current group > > memberships. You'll see that "sudo" is not one of them. > > I found that if I then tried "id rprice" I could see "sudo". Y

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Roger Price
On Sun, 6 Oct 2024, Greg Wooledge wrote: # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL The %sudo line in /etc/sudoers has no effect. Is there some other incantation needed in /etc/sudoers ? You need to log out and back in, or at least start a new authent

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Greg Wooledge
# Allow members of group sudo to execute any command >%sudo ALL=(ALL:ALL) ALL > > so as root I ran command "usermod -a -G sudo rprice" and checked that > /etc/group contained "sudo:x:27:rprice". I then tried again to call > synaptic, with the same res

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Roger Price
On Sun, 6 Oct 2024, Joe wrote: On Sun, 6 Oct 2024 10:47:05 +0200 (CEST) Roger Price wrote: ... As with Debian 11, a synaptic popup asks for the super user password, but after entering root password I get "Authentification failure". This worked on Debian 11. One test to try is

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread tomas
On Sun, Oct 06, 2024 at 11:24:03AM +0100, Brad Rogers wrote: > On Sun, 6 Oct 2024 10:47:24 +0100 > Joe wrote: > > Hello Joe, > > >My graphical menu calls synaptic-pkexec, and it definitely wants the > > As does mine. > > >root password, and it says so expl

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Joe
On Sun, 6 Oct 2024 11:24:03 +0100 Brad Rogers wrote: > On Sun, 6 Oct 2024 10:47:24 +0100 > Joe wrote: > > Hello Joe, > > >My graphical menu calls synaptic-pkexec, and it definitely wants the > > > > As does mine. > > >root password, and it says so

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Brad Rogers
On Sun, 6 Oct 2024 10:47:24 +0100 Joe wrote: Hello Joe, >My graphical menu calls synaptic-pkexec, and it definitely wants the As does mine. >root password, and it says so explicitly. Here, I get a different result. The requester asks for authentication but does not specify root pa

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Joe
On Sun, 6 Oct 2024 10:47:05 +0200 (CEST) Roger Price wrote: > I installed Debian 12 and defined a user. Now I would like to > install other packages as that user. As with Debian 11, a synaptic > popup asks for the super user password, but after entering root > password I get "

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Brad Rogers
On Sun, 6 Oct 2024 10:47:05 +0200 (CEST) Roger Price wrote: Hello Roger, >I click on "details" but all I see is "Action: >com.ubuntu.pkexec.synaptic". PolicyKit is installed: you must use the user's password. -- Regards _ "Valid sig separator is {dash}{dash}{space}" / )

Re: Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Michael Kjörling
On 6 Oct 2024 10:47 +0200, from ro...@rogerprice.org (Roger Price): > I installed Debian 12 and defined a user. Now I would like to install other > packages as that user. As with Debian 11, a synaptic popup asks for the > super user password, but after entering root passw

Debian 12: User calls synaptic: Unable to authenticate root

2024-10-06 Thread Roger Price
I installed Debian 12 and defined a user. Now I would like to install other packages as that user. As with Debian 11, a synaptic popup asks for the super user password, but after entering root password I get "Authentification failure". This worked on Debian 11. I click on "d

Re: Access and Back-up a Root locked laptop

2024-06-17 Thread Michael Kjörling
On 17 Jun 2024 13:33 -0600, from avelinoheribe...@gmail.com (HERIBERTO AVELINO): > My root account is locked. I experienced the well known issue "Debian > authentication failure" at the log-in stage, i.e. it would not accept the > root password. I haven't heard of any

Re: Access and Back-up a Root locked laptop

2024-06-17 Thread Andy Smith
Hi, On Mon, Jun 17, 2024 at 01:33:12PM -0600, HERIBERTO AVELINO wrote: > My root account is locked. I experienced the well known issue "Debian > authentication failure" at the log-in stage, i.e. it would not accept the > root password. With physical access to the machine and w

Re: Access and Back-up a Root locked laptop

2024-06-17 Thread eben
On 6/17/24 15:33, HERIBERTO AVELINO wrote: Dear all My root account is locked. I experienced the well known issue "Debian authentication failure" at the log-in stage, i.e. it would not accept the root password. I accessed the BIOS to enter the safe mode, and discovered that my har

Access and Back-up a Root locked laptop

2024-06-17 Thread HERIBERTO AVELINO
Dear all My root account is locked. I experienced the well known issue "Debian authentication failure" at the log-in stage, i.e. it would not accept the root password. I accessed the BIOS to enter the safe mode, and discovered that my hard drive is almost full. I shall not attem

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

2024-05-14 Thread Greg Wooledge
On Tue, May 14, 2024 at 02:51:17PM +0200, Mario Marietto wrote: > I've installed the Cloudflare gateway on Debian as a vm because I can't do > it directly in FreeBSD. But I want to be covered even when I use FreeBSD. > The script that I wrote forward the Cloudflare "VPN" from Debian to > FreeBSD,so

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

2024-05-14 Thread Mario Marietto
I've installed the Cloudflare gateway on Debian as a vm because I can't do it directly in FreeBSD. But I want to be covered even when I use FreeBSD. The script that I wrote forward the Cloudflare "VPN" from Debian to FreeBSD,so from outside my IP will be cloudFlared. On Tue, May 14, 2024 at 1:16 P

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

2024-05-14 Thread Greg Wooledge
On Tue, May 14, 2024 at 01:10:05PM +0200, Mario Marietto wrote: > Your answer does not help me to understand how to use a "structured > programming / if , while, for, functions" for the specific task that I want > to achieve. What task is that?

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

2024-05-14 Thread Mario Marietto
Your answer does not help me to understand how to use a "structured programming / if , while, for, functions" for the specific task that I want to achieve. I failed using "your" lovely structured programming and that's the reason why I'm asking for some hint to understand why and how I can use it.

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

2024-05-14 Thread Greg Wooledge
On Tue, May 14, 2024 at 08:09:18AM +0200, Mario Marietto wrote: > Nobody can show a different way,a modern way, for creating my script ? Why > did I feel so comfortable by recreating the 1960s GOTO statement in Bash ? I have absolutely no clue what you're trying to do or why you're trying to do it

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-14 Thread tomas
On Tue, May 14, 2024 at 04:54:26PM +0800, Bret Busby wrote: > > Wasn't sudo echo the name of a pop group? > > :) If it wasn't it should've been one. Cheers -- t signature.asc Description: PGP signature

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-14 Thread Bret Busby
Wasn't sudo echo the name of a pop group? :) Bret Busby Armadale Western Australia (UTC+0800) .

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

2024-05-13 Thread tomas
On Tue, May 14, 2024 at 08:09:18AM +0200, Mario Marietto wrote: > Nobody can show a different way,a modern way, for creating my script ? Why > did I feel so comfortable by recreating the 1960s GOTO statement in Bash ? I think your style is too alien to most of the people here to make them feel the

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

2024-05-13 Thread Mario Marietto
> } > > Anyway, Marietto, you've got two typi: > > > mid : > That should be "mid:". > > > jump foo > That should be "jumpto foo". > > Once you've got your root-login script working, I hope you > move on to implementing a complete open-source PL/I compiler. > -- Mario.

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread tomas
On Mon, May 13, 2024 at 08:37:16PM +0200, Erwan David wrote: > Le 13/05/2024 à 19:45, Stefan Monnier a écrit : [...] > > % sudo zsh -l > > # echo 1 > /proc/sys/net/ipv4/ip_forward > > # ^D > > logout > > % > > > > 🙂 > > > > > > Stefan > > > > > sudo -i will

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

2024-05-13 Thread Mario Marietto
> > > > > > 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

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

2024-05-13 Thread David Wright
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&

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

2024-05-13 Thread Mario Marietto
file > > > > 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 r

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

2024-05-13 Thread Greg Wooledge
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 me

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread Erwan David
Le 13/05/2024 à 19:45, Stefan Monnier a écrit : $ su - Password: # echo 1 > /proc/sys/net/ipv4/ip_forward # ^D logout $ I don't need no stinkin' sudo :-) And if you only have `sudo`, but not the root password, of course: % sudo zsh -l # echo 1 > /proc/sys/net

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread tomas
On Mon, May 13, 2024 at 01:45:40PM -0400, Stefan Monnier wrote: > > $ su - > > Password: > > # echo 1 > /proc/sys/net/ipv4/ip_forward > > # ^D > > logout > > $ > > > > I don't need no stinkin' sudo :-) > > And if you only have `

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread Stefan Monnier
> $ su - > Password: > # echo 1 > /proc/sys/net/ipv4/ip_forward > # ^D > logout > $ > > I don't need no stinkin' sudo :-) And if you only have `sudo`, but not the root password, of course: % sudo zsh -l # echo 1 > /proc/sys/net/ipv4/

Re: sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread Christian Groessler
On 5/13/24 18:52, to...@tuxteam.de wrote: Now share your ideas :-) $ su - Password: # echo 1 > /proc/sys/net/ipv4/ip_forward # ^D logout $ I don't need no stinkin' sudo :-) regards, chris

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

2024-05-13 Thread Richard
>> If yes, second dumb question: Coiuld it be ANY script or command? >> (also running as non-rootuser, like adding "runuser -u myuser >> command_whatever"). >Root can do this, yes. Or to be more precise, .bashrc (and any file that's read from it like .bash_al

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

2024-05-13 Thread Mario Marietto
400, Greg Wooledge wrote: > > On Mon, May 13, 2024 at 02:03:59PM +0100, Richmond wrote: > > > >> sudo xterm -e "echo 1 > hello" > > > > > Yes, but why did it allow me to delete the file? I was not root > > > then. Try it. > > > >

sudo echo 1 > /proc/sys/net/ipv4/ip_forward [was: How to run automatically a script as soon root login]

2024-05-13 Thread tomas
Since this happens so often, I'm trying to offer a recap. As others have noted, the above sudo echo 1 > /proc/sys/net/ipv4/ip_forward won't work, since it runs echo under sudo, but the file opening (that pesky ">") happens in your shell, which is probably running unprivileged (otherwise, what

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

2024-05-13 Thread Will Mengarini
l "$cmd" > exit > } Anyway, Marietto, you've got two typi: > mid : That should be "mid:". > jump foo That should be "jumpto foo". Once you've got your root-login script working, I hope you move on to implementing a complete open-source PL/I compiler.

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

2024-05-13 Thread Richmond
Mario Marietto writes: > There is still a problem. If I login automatically as user and inside > the script I do this : > > sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > > it asks me for the password (don't know why it didn't before) but I > can't issue a password,because the

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

2024-05-13 Thread Mario Marietto
etto, you've got two typi: > > > mid : > That should be "mid:". > > > jump foo > That should be "jumpto foo". > > Once you've got your root-login script working, I hope you > move on to implementing a complete open-source PL/I compiler. > -- Mario.

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

2024-05-13 Thread tomas
pt or command? > (also running as non-rootuser, like adding "runuser -u myuser > command_whatever"). Root can do this, yes. Cheers -- t signature.asc Description: PGP signature

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

2024-05-13 Thread Hans
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? If yes, second dumb que

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

2024-05-13 Thread Mario Marietto
[image: Istantanea_2024-05-13_17-37-39.png] Can someone explain to me why user "marietto" can't execute the command iptables as root,without password ? thanks. [image: Istantanea_2024-05-13_17-40-21.png] On Mon, May 13, 2024 at 5:19 PM Mario Marietto wrote: > There is sti

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

2024-05-13 Thread Mario Marietto
There is still a problem. If I login automatically as user and inside the script I do this : sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE it asks me for the password (don't know why it didn't before) but I can't issue a password,because the script inside the vm should work aut

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

2024-05-13 Thread Stefan Monnier
> You don't need to, but I definitely think he does. 🙂 ^^ [ Oh, bias, when will you leave me alone? ] Stefan

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

2024-05-13 Thread Mario Marietto
it reminded me of my old good times when I was a good basic and turbo pascal programmer. On Mon, May 13, 2024 at 3:24 PM Nicolas George wrote: > Mario Marietto (12024-05-13): > > The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > > doesn't work if invoke

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

2024-05-13 Thread Stefan Monnier
>> > echo 1 > /proc/sys/net/ipv4/ip_forward >> This doesn't sound right. Maybe you should investigate why you're > No need to “investigate”, the answer is obvious: in You don't need to, but I definitely think he does. 🙂 Stefan

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

2024-05-13 Thread Nicolas George
Mario Marietto (12024-05-13): > The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > doesn't work if invoked as a user,it says "you must be root". So,as > user,the script seems to be working fine like this : > > function jumpto > { >

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

2024-05-13 Thread tomas
On Mon, May 13, 2024 at 09:17:31AM -0400, Greg Wooledge wrote: > On Mon, May 13, 2024 at 02:03:59PM +0100, Richmond wrote: > > >> sudo xterm -e "echo 1 > hello" > > > Yes, but why did it allow me to delete the file? I was not root > > then. Try it. &g

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

2024-05-13 Thread Erwan David
Le 13/05/2024 à 15:03, Richmond a écrit : Erwan David writes: Le 13/05/2024 à 14:36, Richmond a écrit : I was experimenting, and found this works: sudo xterm -e "echo 1 > hello" It created a file owned by root. But I found I was able to remove it without being root even tho

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

2024-05-13 Thread Greg Wooledge
On Mon, May 13, 2024 at 02:03:59PM +0100, Richmond wrote: > >> sudo xterm -e "echo 1 > hello" > Yes, but why did it allow me to delete the file? I was not root > then. Try it. Because you have write permission on the *directory* that the file is in. Removing (unlin

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

2024-05-13 Thread Mario Marietto
The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE doesn't work if invoked as a user,it says "you must be root". So,as user,the script seems to be working fine like this : function jumpto { label=$1 cmd=$(sed -n "/$label:/{:a;n;

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

2024-05-13 Thread Nicolas George
Richmond (12024-05-13): > sudo bash -c "echo 1 > hello" Use sh for that. Regards, -- Nicolas George

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

2024-05-13 Thread Richmond
Erwan David writes: > Le 13/05/2024 à 14:36, Richmond a écrit : >> I was experimenting, and found this works: >> >> sudo xterm -e "echo 1 > hello" >> >> It created a file owned by root. But I found I was able to remove it >> without being ro

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

2024-05-13 Thread Richmond
writes: > On Mon, May 13, 2024 at 01:36:23PM +0100, Richmond wrote: >> I was experimenting, and found this works: >> >> sudo xterm -e "echo 1 > hello" > > That's like slicing your morning baguette with the chainsaw. I do that too. > > But if it works for you... hey :-) > > Cheers This also wo

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

2024-05-13 Thread Dan Ritter
Richmond wrote: > I was experimenting, and found this works: > > sudo xterm -e "echo 1 > hello" > > It created a file owned by root. But I found I was able to remove it > without being root even though group and world permissions were read > only. The owner

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

2024-05-13 Thread tomas
On Mon, May 13, 2024 at 02:53:18PM +0200, Nicolas George wrote: > to...@tuxteam.de (12024-05-13): > > That's like slicing your morning baguette with the chainsaw. > > Worse than that, it will only work from an X11 environment. Certainly > not at boot. The analogy to that would be that not many ki

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

2024-05-13 Thread Nicolas George
to...@tuxteam.de (12024-05-13): > That's like slicing your morning baguette with the chainsaw. Worse than that, it will only work from an X11 environment. Certainly not at boot. Regards, -- Nicolas George

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

2024-05-13 Thread tomas
On Mon, May 13, 2024 at 01:36:23PM +0100, Richmond wrote: > I was experimenting, and found this works: > > sudo xterm -e "echo 1 > hello" That's like slicing your morning baguette with the chainsaw. But if it works for you... hey :-) Cheers -- t signature.asc Description: PGP signature

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

2024-05-13 Thread Erwan David
Le 13/05/2024 à 14:36, Richmond a écrit : I was experimenting, and found this works: sudo xterm -e "echo 1 > hello" It created a file owned by root. But I found I was able to remove it without being root even though group and world permissions were read only. thats because su

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

2024-05-13 Thread Richmond
I was experimenting, and found this works: sudo xterm -e "echo 1 > hello" It created a file owned by root. But I found I was able to remove it without being root even though group and world permissions were read only.

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

2024-05-13 Thread Nicolas George
Dan Ritter (12024-05-13): > Mario Marietto wrote:> If you run > > sudo echo 1 > /proc/sys/net/ipv4/ip_forward > > then the shell you are running it from will run "sudo echo 1" > and then try to put the output in that file. Other way around: the shell first tries to redirect the output to the fi

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

2024-05-13 Thread Dan Ritter
Mario Marietto wrote: > --> 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 conn

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

2024-05-13 Thread Nicolas George
Stefan Monnier (12024-05-13): > > echo 1 > /proc/sys/net/ipv4/ip_forward > > > > work only if I'm root. It does not work using sudo. > This doesn't sound right. Maybe you should investigate why you're > seeing this behavior, rather than work around the p

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

2024-05-13 Thread Stefan Monnier
> echo 1 > /proc/sys/net/ipv4/ip_forward > > work only if I'm root. It does not work using sudo. This doesn't sound right. Maybe you should investigate why you're seeing this behavior, rather than work around the problem. `sudo` *is* root. Stefan

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

2024-05-13 Thread Greg Wooledge
On Mon, May 13, 2024 at 01:48:25PM +0200, Mario Marietto wrote: > 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

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

2024-05-13 Thread Erwan David
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 co

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

2024-05-13 Thread Mario Marietto
--> 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

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

2024-05-13 Thread Mario Marietto
Hello to everyone, Richard,thanks. I've launched the script inside the .profile file that's inside the root folder and it worked. Thank you. Plan B : From time to time the cloudflare connection stops working,so there is the needing to repeat these commands : warp-cli disconnect warp-c

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

2024-05-13 Thread Greg Wooledge
. That said, since this thread is specifically about *root* logins, GUI logins may not be possible. It depends on which Display Manager and Desktop Environment are in use. Many of them explicitly disallow direct root logins. So, ultimately it comes down to what the OP actually requires, and what typ

  1   2   3   4   5   6   7   8   9   10   >