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: add user to a group and logout/login to apply

2025-02-04 Thread Vasyl Vavrychuk
On Tue, Feb 4, 2025 at 4:27 AM Max Nikulin wrote: > > On 02/02/2025 22:51, Vasyl Vavrychuk wrote: > > On the other hand, I've checked that with Debian 12 and GNOME it is > > not enough to logout and login to see that a user is added to a group. > > > > Any com

Re: add user to a group and logout/login to apply

2025-02-03 Thread Max Nikulin
On 02/02/2025 22:51, Vasyl Vavrychuk wrote: On the other hand, I've checked that with Debian 12 and GNOME it is not enough to logout and login to see that a user is added to a group. Any comments? Wait a bit longer before next login (and check there is no VT or ssh logins at the same

Re: add user to a group and logout/login to apply

2025-02-02 Thread Greg Wooledge
On Sun, Feb 02, 2025 at 16:55:25 -0600, Nicholas Geovanis wrote: > Don't you need to use "newgrp" to change the current running group > membership of existing sessions? That doesn't change a *session*. It just creates a single shell with the updated permissions. Your window manager, your systemd

Re: add user to a group and logout/login to apply

2025-02-02 Thread Nicholas Geovanis
anuals/debian-reference/ch01.en.html#_permissions_for_groups_of_users_group > ) > > > says one of the option to apply change of group user configuration > > > is > > > > Logout via GUI menu and login. > > > > > > It is not marked as "Best option" such as > >

Re: add user to a group and logout/login to apply

2025-02-02 Thread Greg Wooledge
On Sun, Feb 02, 2025 at 21:19:18 +, Joe wrote: > For a simple DE, just cat /etc/group will check that a group add > command worked. The next login will make use of the group membership. That's correct, and also: * "id USERNAME" (passing an argument) will tell you what

Re: add user to a group and logout/login to apply

2025-02-02 Thread Joe
f the option to apply change of group user configuration > > is > > > Logout via GUI menu and login. > > > > It is not marked as "Best option" such as > > > > > Cold reboot and login. (Best option) > > > > but per my understand

Re: add user to a group and logout/login to apply

2025-02-02 Thread Henning Follmann
t via GUI menu and login. > > It is not marked as "Best option" such as > > > Cold reboot and login. (Best option) > > but per my understanding, it does not mean that it does not work. > > On the other hand, I've checked that with Debian 12 and GNOME it is

Re: add user to a group and logout/login to apply

2025-02-02 Thread Dan Purgert
On Feb 02, 2025, Vasyl Vavrychuk wrote: > Debian reference > (https://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_permissions_for_groups_of_users_group) > says one of the option to apply change of group user configuration is > > > Logout via GUI menu and login. >

add user to a group and logout/login to apply

2025-02-02 Thread Vasyl Vavrychuk
Debian reference (https://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_permissions_for_groups_of_users_group) says one of the option to apply change of group user configuration is > Logout via GUI menu and login. It is not marked as "Best option" such as > Cold

Re: absent last login report on vtty login

2024-11-06 Thread Felix Miata
Felix Miata composed on 2024-11-05 13:37 (UTC-0500): > Felix Miata composed on 2024-11-05 08:17 (UTC-0500): >> This used to be a normal announcement on vtty login. On Trixie it's missing. >> What's responsible for it? Is it different on Trixie? On Tumbleweed it's a

Re: absent last login report on vtty login

2024-11-05 Thread Charles Curley
On Tue, 5 Nov 2024 13:37:26 -0500 Jeffrey Walton wrote: > I believe the message in SSH is due to /etc/ssh/sshd_config. Search > for "banner." I think not. My sshd_config files on both bookworm and trixie have banner commented out. According to the man page for that file, the default is no banner

Re: absent last login report on vtty login

2024-11-05 Thread Jeffrey Walton
On Tue, Nov 5, 2024 at 12:00 PM Charles Curley wrote: > > On Tue, 5 Nov 2024 07:15:50 -0700 > Charles Curley wrote: > > > On Tue, 5 Nov 2024 08:17:57 -0500 > > Felix Miata wrote: > > > > > This used to be a normal announcement on vtty login. On Trixi

Re: absent last login report on vtty login

2024-11-05 Thread Felix Miata
Felix Miata composed on 2024-11-05 08:17 (UTC-0500): > This used to be a normal announcement on vtty login. On Trixie it's missing. > What's responsible for it? Is it different on Trixie? On Tumbleweed it's a > separate package lastlog or something like that. Search for si

Re: absent last login report on vtty login

2024-11-05 Thread Charles Curley
On Tue, 5 Nov 2024 07:15:50 -0700 Charles Curley wrote: > On Tue, 5 Nov 2024 08:17:57 -0500 > Felix Miata wrote: > > > This used to be a normal announcement on vtty login. On Trixie it's > > missing. > > Odd. It's present on the VM I recently in

Re: absent last login report on vtty login

2024-11-05 Thread Max Nikulin
On 05/11/2024 20:17, Felix Miata wrote: This used to be a normal announcement on vtty login. On Trixie it's missing. Transition to 64bit time_t? https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/

Re: absent last login report on vtty login

2024-11-05 Thread tomas
On Tue, Nov 05, 2024 at 10:08:51AM -0500, Felix Miata wrote: > Greg Wooledge composed on 2024-11-05 08:27 (UTC-0500): > > > On Tue, Nov 05, 2024 at 08:17:57 -0500, Felix Miata wrote: > > >> This used to be a normal announcement on vtty login. On Trixie it's > >

Re: absent last login report on vtty login

2024-11-05 Thread Felix Miata
Greg Wooledge composed on 2024-11-05 08:27 (UTC-0500): > On Tue, Nov 05, 2024 at 08:17:57 -0500, Felix Miata wrote: >> This used to be a normal announcement on vtty login. On Trixie it's missing. >> What's responsible for it? > I think it's part of /etc/pam.d

Re: absent last login report on vtty login

2024-11-05 Thread Felix Miata
Charles Curley composed on 2024-11-05 09:15 (UTC-0500): > On Tue, 5 Nov 2024 08:17:57 -0500 Felix Miata wrote: >> This used to be a normal announcement on vtty login. On Trixie it's >> missing. > Odd. It's present on the VM I recently installed using a recent weekl

Re: absent last login report on vtty login

2024-11-05 Thread Charles Curley
On Tue, 5 Nov 2024 08:17:57 -0500 Felix Miata wrote: > This used to be a normal announcement on vtty login. On Trixie it's > missing. Odd. It's present on the VM I recently installed using a recent weekly build, "testing _Trixie_ - Official Snapshot amd64 NETINST with fi

Re: absent last login report on vtty login

2024-11-05 Thread Greg Wooledge
On Tue, Nov 05, 2024 at 08:17:57 -0500, Felix Miata wrote: > This used to be a normal announcement on vtty login. On Trixie it's missing. > What's responsible for it? I think it's part of /etc/pam.d/login . On Debian 12, that file includes this bit: # Prints the last login

absent last login report on vtty login

2024-11-05 Thread Felix Miata
This used to be a normal announcement on vtty login. On Trixie it's missing. What's responsible for it? Is it different on Trixie? On Tumbleweed it's a separate package lastlog or something like that. Search for similar for Trixie comes up empty. :( -- Evolution as taught in pu

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Timothy M Butterworth
On Sat, Oct 26, 2024 at 5:20 AM Chris Green wrote: > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > pretty smoothly but for some reason when I do a GUI login my .profile > doesn't get run. > > If I ssh into the laptop then .profile does get run. >

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Chris Green
hints: > > - > <https://wiki.debian.org/EnvironmentVariables#Using_graphical_display_manager> > - <https://wiki.debian.org/LightDM#User_configuration> Yes, it does seem that there's some disagreement between distros as to whether a GUI login should run .profile or not. I ha

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Greg Wooledge
On Sat, Oct 26, 2024 at 12:08:31 +0100, Chris Green wrote: > Michael Kjörling wrote: > > On 26 Oct 2024 10:13 +0100, from c...@isbd.net (Chris Green): > > > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > > > pretty smoothly but for some reas

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Max Nikulin
On 26/10/2024 18:08, Chris Green wrote: Well on my previous XFCE installation on xubuntu it certainly did run ~/.profile. LightDM package in Ubuntu contains an additional script that reads ~/.profile (like SDDM in Debian). Some hints: -

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Michael Kjörling
On 26 Oct 2024 12:08 +0100, from c...@isbd.net (Chris Green): >> As I understand it, those are meant to be run by a _login shell_. This >> sets them apart from e.g. ~/.bashrc which is read each time _bash_ is >> started. >> > Yes, and entering one's name and password at GUI start-up **is** > loggi

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Chris Green
Michael Kjörling wrote: > On 26 Oct 2024 10:13 +0100, from c...@isbd.net (Chris Green): > > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > > pretty smoothly but for some reason when I do a GUI login my .profile > > doesn't get run. > > Is

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Chris Green
t for some reason when I do a GUI login my .profile > > doesn't get run. > > > > If I ssh into the laptop then .profile does get run. > > > > So what might cause this? > > > > What Desktop Environment are you using? > Oops, sorry, I should have said. It's XFCE. -- Chris Green ·

Re: New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Michael Kjörling
On 26 Oct 2024 10:13 +0100, from c...@isbd.net (Chris Green): > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > pretty smoothly but for some reason when I do a GUI login my .profile > doesn't get run. Is starting a GUI session (whether X11/Xorg or Wayland) even

New Debian 12 installation, GUI login doesn't run .profile

2024-10-26 Thread Chris Green
I have installed Debian 12 on my Lenovo Thinkpad T470. It all went pretty smoothly but for some reason when I do a GUI login my .profile doesn't get run. If I ssh into the laptop then .profile does get run. So what might cause this? -- Chris Green ·

Re: Debain XFCE login issue

2024-10-15 Thread David Wright
e > > the correct password successfully in the terminal on the same day. Presumably a Console or other text screen? > > The > > issue I'm facing is that I can't bypass the login screen; when I enter > > my correct password, there's no response at all. > >

Re: Debain XFCE login issue

2024-10-15 Thread Chris Green
is that I can't bypass the login screen; when I enter > my correct password, there's no response at all. > This is something that has caught me out a couple of times, the wrong keyboard setup? You can test the characters you use in your password by typing them into the user

Re: Debain XFCE login issue

2024-10-15 Thread Bala Personal
Hi Charles, I attempted to log in with the wrong password, and I received a notification that my password was incorrect. However, I was able to use the correct password successfully in the terminal on the same day. The issue I'm facing is that I can't bypass the login screen; when I

Re: Debain XFCE login issue

2024-10-14 Thread George at Clug
; >>>> I’m a moderate Linux user and I recently installed Debian with XFCE > >>>> using the expert installation option. The installation was > >>>> successful, but I’m experiencing issues during login. When I > >>>> attempt to boot in, it enters

Re: Debain XFCE login issue

2024-10-14 Thread Charles Curley
On Mon, 14 Oct 2024 21:14:09 +0530 Bala Personal wrote: > I did not get any response from any, or am i missing anything to read? If you are subscribed to the list, you should have received a reply from me. I replied to the list. List-Subscribe:

Re: Debain XFCE login issue

2024-10-14 Thread Bala Personal
and I recently installed Debian with XFCE using the expert installation option. The installation was successful, but I’m experiencing issues during login. When I attempt to boot in, it enters the window manager, but I get no response with my username and password, and there are no error messages

Re: Debain XFCE login issue

2024-10-14 Thread Bala Personal
and I recently installed Debian with XFCE using the expert installation option. The installation was successful, but I’m experiencing issues during login. When I attempt to boot in, it enters the window manager, but I get no response with my username and password, and there are no error messages

Re: Debain XFCE login issue

2024-10-14 Thread David Wright
; > using the expert installation option. The installation was > > > successful, but I’m experiencing issues during login. When I > > > attempt to boot in, it enters the window manager, but I get no > > > response with my username and password, and there are no er

Re: Debain XFCE login issue

2024-10-14 Thread Joe
sful, but I’m experiencing issues during login. When I > > attempt to boot in, it enters the window manager, but I get no > > response with my username and password, and there are no error > > messages displayed. > > > > I’m certain I’m using the correct username and passw

Re: Debain XFCE login issue

2024-10-14 Thread Bala Personal
Gentle reminder for the below concern. On 12/10/24 09:56, Bala Personal wrote: Hello, I’m a moderate Linux user and I recently installed Debian with XFCE using the expert installation option. The installation was successful, but I’m experiencing issues during login. When I attempt to boot in

Re: Debain XFCE login issue

2024-10-11 Thread Charles Curley
On Sat, 12 Oct 2024 09:56:15 +0530 Bala Personal wrote: > Hello, > > I’m a moderate Linux user and I recently installed Debian with XFCE > using the expert installation option. The installation was > successful, but I’m experiencing issues during login. When I attempt > to

Debain XFCE login issue

2024-10-11 Thread Bala Personal
Hello, I’m a moderate Linux user and I recently installed Debian with XFCE using the expert installation option. The installation was successful, but I’m experiencing issues during login. When I attempt to boot in, it enters the window manager, but I get no response with my username and

Re: cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread DdB
Am 23.07.2024 um 11:59 schrieb Андрей Егин: > > > Cant login without any massage, when do not free space on disk. > > I did this issue: > > https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/154 > > and me to tell this: > > Feel free to file this in the i

Re: cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread Michael Kjörling
On 23 Jul 2024 13:00 +0200, from geo...@nsup.org (Nicolas George): > No need for all that, just log in on a text console, it will work. The > issue here is GNOME, as usual. I can tell that you didn't read my whole post before replying. I mentioned exactly that in the paragraph following the one yo

Re: cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread Nicolas George
Michael Kjörling (12024-07-23): > If you can log in as root, then try doing that to either delete or > move some things out of the way; specifically, to a different file > system. If you can't do that (for example, because you never set up a > root password, or because that logi

Re: cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread Michael Kjörling
On 23 Jul 2024 12:59 +0300, from egi...@prombiofit.com (Андрей Егин): > Cant login without any massage, when do not free space on disk. In general, a lot of things will break when the file system that holds your home directory is completely full, which appears to be the case for you. If that

cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread Андрей Егин
Cant login without any massage, when do not free space on disk. I did this issue: https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/154 and me to tell this: Feel free to file this in the issue tracker of your distribution https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/154

Re: GUI-Login on bookworm-VM in a cloud

2024-07-08 Thread George at Clug
Christoph, I think this statement holds the answer: https://opennebula.io/blog/announcements/new-maintenance-release-opennebula683/ New Features: OpenNebula 6.8.3 introduces support for Debian 12 and removes support for Debian 10. Thus my guess is that OpenNebula versions before 6.8.3 do not su

Re: GUI-Login on bookworm-VM in a cloud

2024-07-08 Thread Christoph Pleger
Hello, > > The same result for me after directly installing bookworm with virt- > > manager. Obviously, there is a significant difference between a VM in > > OpenNebula and a VM with the same software in virt-manager ... > > Are you able to try Virt-Manager with your original VM that you are havi

Re: GUI-Login on bookworm-VM in a cloud

2024-07-05 Thread George at Clug
; It is the qemu vga driver. I already tried qemu virtio and qemu vmware > drivers, they have the same problem as the vga driver: No sddm GUI > login screen. > > > > I can now tell that the problem is introduced when upgrading the > > > following packages from bullseye to th

Re: GUI-Login on bookworm-VM in a cloud

2024-07-05 Thread Christoph Pleger
the same problem as the vga driver: No sddm GUI login screen. > > I can now tell that the problem is introduced when upgrading the > > following packages from bullseye to their bookworm versions: > > Did you upgrade your full distribution or only these files? > > I would nev

Re: GUI-Login on bookworm-VM in a cloud

2024-07-05 Thread George at Clug
t; To get to the bottom of the problem, I upgraded a bullseye VM > > to a bookworm VM step by step: first libc, then the Xorg- > > packages, then the kernel, then sddm, lightdm and gdm3, and finally > the > > rest. Unfortunately, it was only after the rest that the GUI login no

Re: GUI-Login on bookworm-VM in a cloud

2024-07-04 Thread Christoph Pleger
Hello, > To get to the bottom of the problem, I upgraded a bullseye VM > to a bookworm VM step by step: first libc, then the Xorg- > packages, then the kernel, then sddm, lightdm and gdm3, and finally the > rest. Unfortunately, it was only after the rest that the GUI login no >

Re: GUI-Login on bookworm-VM in a cloud

2024-07-04 Thread Christoph Pleger
Hello George, > Not sure if this is relevant or not, sadly probably not useful. It is helpful, though probably not in the matter from the email subject. But I installed qemu-guest-agent package in a VM without knowing that the virtual machine template should be made fit for it. Regards Christo

Re: GUI-Login on bookworm-VM in a cloud

2024-07-03 Thread George at Clug
ction="0x0"/> > > > > > > > > > > > > > > > > > > > > > > >function="0x0"/>

Re: GUI-Login on bookworm-VM in a cloud

2024-07-03 Thread George at Clug
> > > > > > However, after installing a VM with Debian 12, none of these three > > > display managers shows its GUI login screen after boot. With sddm > > > it is > > > noticeable that the process sddm-helper crashes shortly after it is > &g

Re: GUI-Login on bookworm-VM in a cloud

2024-07-03 Thread Christoph Pleger
t; > However, after installing a VM with Debian 12, none of these three > > display managers shows its GUI login screen after boot. With sddm > > it is > > noticeable that the process sddm-helper crashes shortly after it is > > started. > > In crashes, do you mean

Re: GUI-Login on bookworm-VM in a cloud

2024-07-02 Thread George at Clug
push information from/to OpenNebula. > have several VMs with Debian 11 running successfully, > sddm, lightdm and gdm3 are installed as display managers. When I choose > one of them, the corresponding GUI login is displayed in the VNC > display of the VM. > > However, after i

GUI-Login on bookworm-VM in a cloud

2024-07-02 Thread Christoph Pleger
Hello, I use the cloud solution OpenNebula to manage VMs in a cloud. There I have several VMs with Debian 11 running successfully, sddm, lightdm and gdm3 are installed as display managers. When I choose one of them, the corresponding GUI login is displayed in the VNC display of the VM. However

Re: [solved] Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-06-01 Thread Nicholas Geovanis
Just to compare, when Red Hat released 9.0 maybe 2 years ago (9.2 is current until 30 June) they disabled by default many older key-lengths and algorithms in SSL that were known to be weak. This caused issues for existing installations. You could either re-enable the weaker methods (easy but a pain

Re: [solved] Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-06-01 Thread Max Nikulin
On 01/06/2024 16:42, Thomas Schmitt wrote: debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5 (I wonder what the string "Debian-5" may mean. The Debian 12 machine has debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2 So "-5" is not the

[solved] Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-06-01 Thread Thomas Schmitt
Hi, Jeffrey Walton wrote: > If I am not mistaken, the problem you are experiencing is due to using > RSA/SHA-1 on the old machine. Max Nikulin wrote: > My reading of /usr/share/doc/openssh-client/NEWS.Debian.gz is that ssh-rsa > means SHA1 while clients offers SHA256 for the same id_rsa key. Ind

Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-05-31 Thread Max Nikulin
On 01/06/2024 01:52, Thomas Schmitt wrote: debug1: Offering public key:/home/.../.ssh/id_rsa RSA SHA256:... [...] The Debian 12 ssh client is obviously willing to try ssh-rsa. My reading of /usr/share/doc/openssh-client/NEWS.Debian.gz is that ssh-rsa means SHA1 while clients offers SHA256

Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-05-31 Thread Jeffrey Walton
On Fri, May 31, 2024 at 7:08 PM Thomas Schmitt wrote: > > i still have network access to a Debian 8 system, to which i logged in > from Debian 11 via ssh and a ssh-rsa key. After the upgrade to Debian 12 > ssh fails with this public key authentication. > The probably relevant messages from a run o

[solved] Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-05-31 Thread Thomas Schmitt
Hi, the following line in ~/.ssh/config did the trick: PubkeyAcceptedAlgorithms +ssh-rsa This lets ssh -v report: debug1: Offering public key: /home/.../.ssh/id_rsa RSA SHA256:... debug1: Server accepts key: /home/.../.ssh/id_rsa RSA SHA256:... Authenticated to ... ([...]:22) using "pub

Re: No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-05-31 Thread Michael Kjörling
On 31 May 2024 20:52 +0200, from scdbac...@gmx.net (Thomas Schmitt): > The ssh-rsa key was generated by Debian 10. man ssh-keygen of buster > says the default of option -b with RSA was 2048. > (Does anybody know how to analyze a key file in regard to such > parameters ?) $ ssh-keygen -l -f $pubkey

No login with Debian 12 ssh client, ssh-rsa key, Debian 8 sshd

2024-05-31 Thread Thomas Schmitt
Hi, i still have network access to a Debian 8 system, to which i logged in from Debian 11 via ssh and a ssh-rsa key. After the upgrade to Debian 12 ssh fails with this public key authentication. The probably relevant messages from a run of ssh -vvv are: debug1: Offering public key: /home/.../.s

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

2024-05-14 Thread Greg Wooledge
uot; from Debian to > FreeBSD,so from outside my IP will be cloudFlared. Disclaimer: I know nothing about Cloudflare. So you wrote a bash script. I will assume this script does what you want it to. You type its name to run it, or you have it set up to run at boot time, or you have it set up to

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/ipv4/ip_forward # ^

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
sudo`, but not the root password, of course: > > % sudo zsh -l > # echo 1 > /proc/sys/net/ipv4/ip_forward > # ^D > logout > % Or just "sudo -s", which will invoke "your" favourite shell. Or "sudo -i", which will do roughly the

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/ip_forward # ^D logout % 🙂 Stefan

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
shrc and similarly named files are pretty much bash-exclusive. So as long as it's something that should run upon login, like setting user-wide environment variables. > Sorry, dumb question: Depending of the shell, the user is using (let's say, he will use bash), can the script not be a

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

2024-05-13 Thread Mario Marietto
I think I have found my way,adding this line to /etc/sudoers : marietto ALL=(ALL) NOPASSWD: /usr/bin/iptables and on the warp script : sudo /usr/bin/iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE On Mon, May 13, 2024 at 3:20 PM wrote: > On Mon, May 13, 2024 at 09:17:31AM -0400, G

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 >

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
s say, > he > will use bash), can the script not be added into ~/.bashrc? Yes. Consult your shell's manual. And it will also depend on whether it is considered to be a "login shell". And on a couple of other factors. > If yes, second dumb question: Coiuld it be ANY scri

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
ll 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 i

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

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
I've found that solution on the Internet. It wasn't the only solution that I found,but that form won the challenge because it has found my mind ready to detect that it could have worked. Maybe I could have used while,but after 1 hour of thinking I didn't understand how and I resigned. The same for

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 > { > label=$1 > cmd=$(sed -n "/$

  1   2   3   4   5   6   7   8   9   10   >