Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #64445 > unrolled thread
| Started by | Bengt T <bengt_tornqvist@hotmail.com> |
|---|---|
| First post | 2020-04-08 10:02 -0700 |
| Last post | 2020-04-09 22:58 -0700 |
| Articles | 20 on this page of 47 — 16 participants |
Back to article view | Back to alt.os.linux
How to allow execution of a script requiring root privileges? Bengt T <bengt_tornqvist@hotmail.com> - 2020-04-08 10:02 -0700
Re: How to allow execution of a script requiring root privileges? "Carlos E.R." <robin_listas@es.invalid> - 2020-04-08 19:20 +0200
Re: How to allow execution of a script requiring root privileges? Aragorn <thorongil@telenet.be> - 2020-04-08 19:54 +0200
Re: How to allow execution of a script requiring root privileges? Aragorn <thorongil@telenet.be> - 2020-04-08 19:58 +0200
Re: How to allow execution of a script requiring root privileges? Soviet_Mario <SovietMario@CCCP.MIR> - 2020-04-08 21:30 +0200
Re: How to allow execution of a script requiring root privileges? Aragorn <thorongil@telenet.be> - 2020-04-08 21:35 +0200
Re: How to allow execution of a script requiring root privileges? Soviet_Mario <SovietMario@CCCP.MIR> - 2020-04-09 16:03 +0200
Re: How to allow execution of a script requiring root privileges? Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-08 13:00 -0500
Re: How to allow execution of a script requiring root privileges? "J.O. Aho" <user@example.net> - 2020-04-08 20:13 +0200
Re: How to allow execution of a script requiring root privileges? "Carlos E.R." <robin_listas@es.invalid> - 2020-04-08 20:27 +0200
Re: How to allow execution of a script requiring root privileges? Richard Kettlewell <invalid@invalid.invalid> - 2020-04-09 09:20 +0100
Re: How to allow execution of a script requiring root privileges? "J.O. Aho" <user@example.net> - 2020-04-09 11:46 +0200
Re: How to allow execution of a script requiring root privileges? Bengt T <bengt_tornqvist@hotmail.com> - 2020-04-08 12:23 -0700
Re: How to allow execution of a script requiring root privileges? Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-08 19:36 -0500
Re: How to allow execution of a script requiring root privileges? Bengt T <bengt_tornqvist@hotmail.com> - 2020-04-08 12:25 -0700
Re: How to allow execution of a script requiring root privileges? "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2020-04-08 19:29 -0400
Re: How to allow execution of a script requiring root privileges? F Russell <fr@random.info> - 2020-04-08 21:32 +0000
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-08 21:47 +0000
Re: How to allow execution of a script requiring root privileges? Wildman <best_lay@yahoo.com> - 2020-04-08 17:00 -0500
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-08 22:15 +0000
Re: How to allow execution of a script requiring root privileges? Wildman <best_lay@yahoo.com> - 2020-04-08 19:05 -0500
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-09 00:12 +0000
Re: How to allow execution of a script requiring root privileges? Wildman <best_lay@yahoo.com> - 2020-04-08 21:03 -0500
Re: How to allow execution of a script requiring root privileges? "Carlos E.R." <robin_listas@es.invalid> - 2020-04-09 13:50 +0200
Re: How to allow execution of a script requiring root privileges? Melzzzzz <Melzzzzz@zzzzz.com> - 2020-04-09 14:29 +0000
[OT] Re: How to allow execution of a script requiring root privileges? Bit Twister <BitTwister@mouse-potato.com> - 2020-04-09 10:19 -0500
Re: How to allow execution of a script requiring root privileges? F Russell <fr@random.info> - 2020-04-08 22:10 +0000
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-08 22:20 +0000
Re: How to allow execution of a script requiring root privileges? F Russell <fr@random.info> - 2020-04-08 22:37 +0000
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-08 22:56 +0000
Re: How to allow execution of a script requiring root privileges? "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2020-04-08 19:33 -0400
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-08 23:50 +0000
Re: How to allow execution of a script requiring root privileges? "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2020-04-08 21:23 -0400
Re: How to allow execution of a script requiring root privileges? mGhost <mGhost@mouse-potato.com> - 2020-04-09 02:45 +0000
Re: How to allow execution of a script requiring root privileges? Bit Twister <BitTwister@mouse-potato.com> - 2020-04-08 23:29 -0500
Re: How to allow execution of a script requiring root privileges? Martyn Barclay <mby@dev.null> - 2020-04-09 07:33 +0100
Re: How to allow execution of a script requiring root privileges? "Carlos E.R." <robin_listas@es.invalid> - 2020-04-09 13:47 +0200
Re: How to allow execution of a script requiring root privileges? Aragorn <thorongil@telenet.be> - 2020-04-09 10:20 +0200
Re: How to allow execution of a script requiring root privileges? Martyn Barclay <mby@dev.null> - 2020-04-09 11:15 +0100
Re: How to allow execution of a script requiring root privileges? Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-08 19:39 -0500
Re: How to allow execution of a script requiring root privileges? "J.O. Aho" <user@example.net> - 2020-04-09 09:30 +0200
Re: How to allow execution of a script requiring root privileges? "J.O. Aho" <user@example.net> - 2020-04-09 09:28 +0200
Re: How to allow execution of a script requiring root privileges? Martyn Barclay <mby@dev.null> - 2020-04-09 11:01 +0100
Re: How to allow execution of a script requiring root privileges? Jasen Betts <jasen@xnet.co.nz> - 2020-04-09 11:06 +0000
Re: How to allow execution of a script requiring root privileges? Allodoxaphobia <trepidation@example.net> - 2020-04-09 17:00 +0000
Re: How to allow execution of a script requiring root privileges? Allodoxaphobia <trepidation@example.net> - 2020-04-10 17:42 +0000
Re: How to allow execution of a script requiring root privileges? Bengt T <bengt_tornqvist@hotmail.com> - 2020-04-09 22:58 -0700
Page 1 of 3 [1] 2 3 Next page →
| From | Bengt T <bengt_tornqvist@hotmail.com> |
|---|---|
| Date | 2020-04-08 10:02 -0700 |
| Subject | How to allow execution of a script requiring root privileges? |
| Message-ID | <4e608c7c-9163-4ac6-bd5f-64f1a24a052c@googlegroups.com> |
In my backup script, using rsync, some directories/files will not be processed because they are only accessible by root. My way around this is to use "sudo my_backup.script" and provide a password. My wish is to allow execution of the backup script directly without "sudo..." and password. Is/are there any way/s to accomplish this?
[toc] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2020-04-08 19:20 +0200 |
| Message-ID | <dod1mg-6gg.ln1@Telcontar.valinor> |
| In reply to | #64445 |
On 08/04/2020 19.02, Bengt T wrote: > In my backup script, using rsync, some directories/files will not be processed because they are only accessible by root. My way around this is to use "sudo my_backup.script" and provide a password. > > My wish is to allow execution of the backup script directly without "sudo..." and password. > > Is/are there any way/s to accomplish this? Yes... making the script suid or sgid. However, that poses a security danger. -- Cheers, Carlos.
[toc] | [prev] | [next] | [standalone]
| From | Aragorn <thorongil@telenet.be> |
|---|---|
| Date | 2020-04-08 19:54 +0200 |
| Message-ID | <20200408195413.41340068@nx-74205> |
| In reply to | #64446 |
On 08.04.2020 at 19:20, Carlos E.R. scribbled: > On 08/04/2020 19.02, Bengt T wrote: > > In my backup script, using rsync, some directories/files will not > > be processed because they are only accessible by root. My way > > around this is to use "sudo my_backup.script" and provide a > > password. > > > > My wish is to allow execution of the backup script directly without > > "sudo..." and password. > > > > Is/are there any way/s to accomplish this? > > Yes... making the script suid or sgid. > > However, that poses a security danger. Not really, because the Linux kernel ignores SUID/SGID on scripts. ;) -- With respect, = Aragorn =
[toc] | [prev] | [next] | [standalone]
| From | Aragorn <thorongil@telenet.be> |
|---|---|
| Date | 2020-04-08 19:58 +0200 |
| Message-ID | <20200408195819.2cb35905@nx-74205> |
| In reply to | #64447 |
On 08.04.2020 at 19:54, Aragorn scribbled: > On 08.04.2020 at 19:20, Carlos E.R. scribbled: > > > On 08/04/2020 19.02, Bengt T wrote: > > > In my backup script, using rsync, some directories/files will not > > > be processed because they are only accessible by root. My way > > > around this is to use "sudo my_backup.script" and provide a > > > password. > > > > > > My wish is to allow execution of the backup script directly > > > without "sudo..." and password. > > > > > > Is/are there any way/s to accomplish this? > > > > Yes... making the script suid or sgid. > > > > However, that poses a security danger. > > Not really, because the Linux kernel ignores SUID/SGID on scripts. ;) A better solution would be to set up /etc/sudoers so that the script may be executed passwordlessly — if that's not a word, then it is now :p — and perhaps create an alias or a shell function to invoke the script with the "sudo" prefix. ;) -- With respect, = Aragorn =
[toc] | [prev] | [next] | [standalone]
| From | Soviet_Mario <SovietMario@CCCP.MIR> |
|---|---|
| Date | 2020-04-08 21:30 +0200 |
| Message-ID | <r6l8p5$k9h$1@dont-email.me> |
| In reply to | #64448 |
On 08/04/20 19:58, Aragorn wrote: > On 08.04.2020 at 19:54, Aragorn scribbled: > >> On 08.04.2020 at 19:20, Carlos E.R. scribbled: >> >>> On 08/04/2020 19.02, Bengt T wrote: >>>> In my backup script, using rsync, some directories/files will not >>>> be processed because they are only accessible by root. My way >>>> around this is to use "sudo my_backup.script" and provide a >>>> password. >>>> >>>> My wish is to allow execution of the backup script directly >>>> without "sudo..." and password. >>>> >>>> Is/are there any way/s to accomplish this? >>> >>> Yes... making the script suid or sgid. >>> >>> However, that poses a security danger. >> >> Not really, because the Linux kernel ignores SUID/SGID on scripts. ;) > > A better solution would be to set up /etc/sudoers so that the script > may be executed passwordlessly — if that's not a word, then it is now > :p — and perhaps create an alias or a shell function to invoke the > script with the "sudo" prefix. ;) > > could you delve deeper into this .... I can't understand the relation between a given script and sudoers -- 1) Resistere, resistere, resistere. 2) Se tutti pagano le tasse, le tasse le pagano tutti Soviet_Mario - (aka Gatto_Vizzato)
[toc] | [prev] | [next] | [standalone]
| From | Aragorn <thorongil@telenet.be> |
|---|---|
| Date | 2020-04-08 21:35 +0200 |
| Message-ID | <20200408213517.1e1144a8@nx-74205> |
| In reply to | #64454 |
On 08.04.2020 at 21:30, Soviet_Mario scribbled: > On 08/04/20 19:58, Aragorn wrote: > > On 08.04.2020 at 19:54, Aragorn scribbled: > > > >> On 08.04.2020 at 19:20, Carlos E.R. scribbled: > >> > >>> On 08/04/2020 19.02, Bengt T wrote: > >>>> In my backup script, using rsync, some directories/files will not > >>>> be processed because they are only accessible by root. My way > >>>> around this is to use "sudo my_backup.script" and provide a > >>>> password. > >>>> > >>>> My wish is to allow execution of the backup script directly > >>>> without "sudo..." and password. > >>>> > >>>> Is/are there any way/s to accomplish this? > >>> > >>> Yes... making the script suid or sgid. > >>> > >>> However, that poses a security danger. > >> > >> Not really, because the Linux kernel ignores SUID/SGID on scripts. > >> ;) > > > > A better solution would be to set up /etc/sudoers so that the script > > may be executed passwordlessly — if that's not a word, then it is > > now :p — and perhaps create an alias or a shell function to invoke > > the script with the "sudo" prefix. ;) > > > > > > could you delve deeper into this .... > I can't understand the relation between a given script and > sudoers You can set the permissions in /etc/sudoers [*] so that a certain user can execute certain commands with root privileges without requiring a password. A script is a command too. :) [*] Read The /Fine/ Manual. :p -- With respect, = Aragorn =
[toc] | [prev] | [next] | [standalone]
| From | Soviet_Mario <SovietMario@CCCP.MIR> |
|---|---|
| Date | 2020-04-09 16:03 +0200 |
| Message-ID | <r6n9v8$jqh$1@dont-email.me> |
| In reply to | #64455 |
On 08/04/20 21:35, Aragorn wrote: > On 08.04.2020 at 21:30, Soviet_Mario scribbled: > >> On 08/04/20 19:58, Aragorn wrote: >>> On 08.04.2020 at 19:54, Aragorn scribbled: >>> >>>> On 08.04.2020 at 19:20, Carlos E.R. scribbled: >>>> >>>>> On 08/04/2020 19.02, Bengt T wrote: >>>>>> In my backup script, using rsync, some directories/files will not >>>>>> be processed because they are only accessible by root. My way >>>>>> around this is to use "sudo my_backup.script" and provide a >>>>>> password. >>>>>> >>>>>> My wish is to allow execution of the backup script directly >>>>>> without "sudo..." and password. >>>>>> >>>>>> Is/are there any way/s to accomplish this? >>>>> >>>>> Yes... making the script suid or sgid. >>>>> >>>>> However, that poses a security danger. >>>> >>>> Not really, because the Linux kernel ignores SUID/SGID on scripts. >>>> ;) >>> >>> A better solution would be to set up /etc/sudoers so that the script >>> may be executed passwordlessly — if that's not a word, then it is >>> now :p — and perhaps create an alias or a shell function to invoke >>> the script with the "sudo" prefix. ;) >>> >>> >> >> could you delve deeper into this .... >> I can't understand the relation between a given script and >> sudoers > > You can set the permissions in /etc/sudoers [*] so that a certain user > can execute certain commands with root privileges without requiring a > password. A script is a command too. :) > > > [*] Read The /Fine/ Manual. :p overwhelming ... > -- 1) Resistere, resistere, resistere. 2) Se tutti pagano le tasse, le tasse le pagano tutti Soviet_Mario - (aka Gatto_Vizzato)
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-08 13:00 -0500 |
| Message-ID | <slrnr8s49b.m22.nedlatham@woden.valhalla.oz> |
| In reply to | #64445 |
Bengt T wrote: > > In my backup script, using rsync, some directories/files will not be > processed because they are only accessible by root. My way around this > is to use "sudo my_backup.script" and provide a password. > > My wish is to allow execution of the backup script directly without > "sudo..." and password. > > Is/are there any way/s to accomplish this? Put your username and rsync in /etc/sudoers
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2020-04-08 20:13 +0200 |
| Message-ID | <hf6iiiFgdgsU1@mid.individual.net> |
| In reply to | #64449 |
On 08/04/2020 20.00, Ned Latham wrote: > Bengt T wrote: >> >> In my backup script, using rsync, some directories/files will not be >> processed because they are only accessible by root. My way around this >> is to use "sudo my_backup.script" and provide a password. >> >> My wish is to allow execution of the backup script directly without >> "sudo..." and password. >> >> Is/are there any way/s to accomplish this? > > Put your username and rsync in /etc/sudoers That would be a security issue, as now you allow the user to sync any file, in which ever direction, so with all the vulnerabilities in browsers in theory a remote attacker could overwrite or create new files in where ever on the system. It's far safer to allow the user to execute the script in /etc/sudoers. Sure a remote attacker could execute the script in the same manner as in the example before, but they would have a lot less control of what they can do, this case it would be just filling the hard drive with new backups, which is kind of harmless compared to compromise a system. -- //Aho
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2020-04-08 20:27 +0200 |
| Message-ID | <8mh1mg-r1j.ln1@Telcontar.valinor> |
| In reply to | #64450 |
On 08/04/2020 20.13, J.O. Aho wrote: > On 08/04/2020 20.00, Ned Latham wrote: >> Bengt T wrote: >>> >>> In my backup script, using rsync, some directories/files will not be >>> processed because they are only accessible by root. My way around this >>> is to use "sudo my_backup.script" and provide a password. >>> >>> My wish is to allow execution of the backup script directly without >>> "sudo..." and password. >>> >>> Is/are there any way/s to accomplish this? >> >> Put your username and rsync in /etc/sudoers > That would be a security issue, as now you allow the user to sync any > file, in which ever direction, so with all the vulnerabilities in > browsers in theory a remote attacker could overwrite or create new files > in where ever on the system. Then put the exact rsync concoction in sudoers :-) -- Cheers, Carlos.
[toc] | [prev] | [next] | [standalone]
| From | Richard Kettlewell <invalid@invalid.invalid> |
|---|---|
| Date | 2020-04-09 09:20 +0100 |
| Message-ID | <87sghd2hqi.fsf@LkoBDZeT.terraraq.uk> |
| In reply to | #64450 |
"J.O. Aho" <user@example.net> writes: > On 08/04/2020 20.00, Ned Latham wrote: >> Bengt T wrote: >>> >>> In my backup script, using rsync, some directories/files will not be >>> processed because they are only accessible by root. My way around this >>> is to use "sudo my_backup.script" and provide a password. >>> >>> My wish is to allow execution of the backup script directly without >>> "sudo..." and password. >>> >>> Is/are there any way/s to accomplish this? >> >> Put your username and rsync in /etc/sudoers > > That would be a security issue, as now you allow the user to sync any > file, in which ever direction, so with all the vulnerabilities in > browsers in theory a remote attacker could overwrite or create new > files in where ever on the system. An attacker can already do that, in the OP’s configuration. If you can sudo to root from an account, that account is equivalent to root in security terms. The requirement to type a password does nothing more than slow the attacker down slightly; there are multiple ways an attacker can arrange to capture it. -- https://www.greenend.org.uk/rjk/
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2020-04-09 11:46 +0200 |
| Message-ID | <hf8987Fr888U1@mid.individual.net> |
| In reply to | #64485 |
On 09/04/2020 10.20, Richard Kettlewell wrote: > "J.O. Aho" <user@example.net> writes: >> On 08/04/2020 20.00, Ned Latham wrote: >>> Bengt T wrote: >>>> >>>> In my backup script, using rsync, some directories/files will not be >>>> processed because they are only accessible by root. My way around this >>>> is to use "sudo my_backup.script" and provide a password. >>>> >>>> My wish is to allow execution of the backup script directly without >>>> "sudo..." and password. >>>> >>>> Is/are there any way/s to accomplish this? >>> >>> Put your username and rsync in /etc/sudoers >> >> That would be a security issue, as now you allow the user to sync any >> file, in which ever direction, so with all the vulnerabilities in >> browsers in theory a remote attacker could overwrite or create new >> files in where ever on the system. > > An attacker can already do that, in the OP’s configuration. If you can > sudo to root from an account, that account is equivalent to root in > security terms. The requirement to type a password does nothing more > than slow the attacker down slightly; there are multiple ways an > attacker can arrange to capture it. Yes, an attacker could figure out the local users password, it's a bit more job than just execute a command. A small rock on the road is better than no rock at all if you want to keep folks from using the road. Had been nice to see a 2 factor authentication for sudo/su. -- //Aho
[toc] | [prev] | [next] | [standalone]
| From | Bengt T <bengt_tornqvist@hotmail.com> |
|---|---|
| Date | 2020-04-08 12:23 -0700 |
| Message-ID | <12396dff-b3ba-48f6-9379-166d9456f406@googlegroups.com> |
| In reply to | #64449 |
> > Put your username and rsync in /etc/sudoers As I understand the following shold be added into /et/sudoers file: <my_user_name> ALL= /usr/bin/rsync Is this correct?
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-08 19:36 -0500 |
| Message-ID | <slrnr8srgh.mfa.nedlatham@woden.valhalla.oz> |
| In reply to | #64452 |
Bengt T wrote: > Ned Latham wrote: > > > > Put your username and rsync in /etc/sudoers > > As I understand the following shold be added into /et/sudoers file: > > <my_user_name> ALL= /usr/bin/rsync > > Is this correct? Yes. Note that the hostname can provide additional security, <user_name> <host_name> = /usr/bin/rsync And with that, you might consider passwordless operation: <user_name> <host_name> = NOPASSWD: /usr/bin/rsync Works a treat for me with chown, halt, reboot, mount and umount.
[toc] | [prev] | [next] | [standalone]
| From | Bengt T <bengt_tornqvist@hotmail.com> |
|---|---|
| Date | 2020-04-08 12:25 -0700 |
| Message-ID | <fa36b46f-b658-4a04-a808-9463ac49a135@googlegroups.com> |
| In reply to | #64449 |
> > Put your username and rsync in /etc/sudoers As I understand the following should be added into /etc/sudoers file: <my_user_name> ALL= /usr/bin/rsync Is this correct?
[toc] | [prev] | [next] | [standalone]
| From | "David W. Hodgins" <dwhodgins@nomail.afraid.org> |
|---|---|
| Date | 2020-04-08 19:29 -0400 |
| Message-ID | <op.0ir3jd0fa3w0dxdave@hodgins.homeip.net> |
| In reply to | #64453 |
On Wed, 08 Apr 2020 15:25:20 -0400, Bengt T <bengt_tornqvist@hotmail.com> wrote: >> Put your username and rsync in /etc/sudoers > As I understand the following should be added into /etc/sudoers file: > <my_user_name> ALL= /usr/bin/rsync Use the exact path and the name of the script. For example ... bengt ALL = (root) NOPASSWD: /usr/local/bin/my_backup.script Make sure the script is read only for anyone other than root. Regards, Dave Hodgins -- Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for email replies.
[toc] | [prev] | [next] | [standalone]
| From | F Russell <fr@random.info> |
|---|---|
| Date | 2020-04-08 21:32 +0000 |
| Message-ID | <r6lftv11jp0@news2.newsguy.com> |
| In reply to | #64445 |
On Wed, 08 Apr 2020 10:02:47 -0700, Bengt T wrote: > In my backup script, using rsync, some directories/files will not be processed > because they are only accessible by root. My way around this is to use "sudo > Your "way around" should be to boot up as the root user and stay as the root user. For the single-user workstation this is the ONLY way. I still hear moans and groans about running as root but all of that security nonsense is just that: nonsense. They can always spout off with generalities but they can never provide specific examples about how a single-user workstation can be compromised by running as root.
[toc] | [prev] | [next] | [standalone]
| From | mGhost <mGhost@mouse-potato.com> |
|---|---|
| Date | 2020-04-08 21:47 +0000 |
| Message-ID | <r6lgpg$lpv$4@dont-email.me> |
| In reply to | #64456 |
On 2020-04-08, F Russell <fr@random.info> wrote: > On Wed, 08 Apr 2020 10:02:47 -0700, Bengt T wrote: > >> In my backup script, using rsync, some directories/files will not be processed >> because they are only accessible by root. My way around this is to use "sudo >> > > Your "way around" should be to boot up as the root user and > stay as the root user. > > For the single-user workstation this is the ONLY way. > > I still hear moans and groans about running as root but > all of that security nonsense is just that: nonsense. > They can always spout off with generalities but they > can never provide specific examples about how a single-user > workstation can be compromised by running as root. > Sure, the idea is that someone might craft a link which floods a buffer in such a way that the code they want to execute is sitting somewhere in memory where there exploit executes it. Without a privileged account, that execution would fail. With a root level user running, it executes and opens Pandora's box. You don't want to be the unknowing victim of some clever attacks where by you make their job even easier. It doesn't take much to open a port on your machine, to a command and control service if your own system doesn't even stop ask you if it should, which it won't if you're already root and as root, you interact with their exploit. What if I write a simple script, which looks normal to you, but the script loads more instructions from the web, which you don't see. It's not in the script you see, except for loading of it. You run it, and as root, I tell your system download an execute a cron job headlessly. And every 10 minutes you're machine asks my machine what I want it to do on my behalf. Not too fun. I could setup accounts, take screen shots, raid your files and upload them to me, grab you email, decrypt your encrypted files, encrypt your drive, and do pretty much anything I want. I'm root. -- Я гость в отеле
[toc] | [prev] | [next] | [standalone]
| From | Wildman <best_lay@yahoo.com> |
|---|---|
| Date | 2020-04-08 17:00 -0500 |
| Message-ID | <moqdnaEXjvH51BPDnZ2dnUU7-WednZ2d@giganews.com> |
| In reply to | #64457 |
On Wed, 08 Apr 2020 21:47:28 +0000, mGhost wrote: > On 2020-04-08, F Russell <fr@random.info> wrote: >> On Wed, 08 Apr 2020 10:02:47 -0700, Bengt T wrote: >> >>> In my backup script, using rsync, some directories/files will not be processed >>> because they are only accessible by root. My way around this is to use "sudo >>> >> >> Your "way around" should be to boot up as the root user and >> stay as the root user. >> >> For the single-user workstation this is the ONLY way. >> >> I still hear moans and groans about running as root but >> all of that security nonsense is just that: nonsense. >> They can always spout off with generalities but they >> can never provide specific examples about how a single-user >> workstation can be compromised by running as root. >> > > Sure, the idea is that someone might craft a link which floods a buffer > in such a way that the code they want to execute is sitting somewhere in > memory where there exploit executes it. Without a privileged account, > that execution would fail. With a root level user running, it executes > and opens Pandora's box. > > You don't want to be the unknowing victim of some clever attacks where > by you make their job even easier. It doesn't take much to open a port > on your machine, to a command and control service if your own system > doesn't even stop ask you if it should, which it won't if you're already > root and as root, you interact with their exploit. > > What if I write a simple script, which looks normal to you, but the > script loads more instructions from the web, which you don't see. It's > not in the script you see, except for loading of it. You run it, and as > root, I tell your system download an execute a cron job headlessly. And > every 10 minutes you're machine asks my machine what I want it to do on > my behalf. Not too fun. I could setup accounts, take screen shots, raid > your files and upload them to me, grab you email, decrypt your encrypted > files, encrypt your drive, and do pretty much anything I want. I'm root. Would not the person writting the script haved to be a complete idiot? You create a script that opens a port on the internet without you knowing it? Nonsense. -- <Wildman> GNU/Linux user #557453 "Gun control requires concentration and a steady hand." -John Wayne
[toc] | [prev] | [next] | [standalone]
| From | mGhost <mGhost@mouse-potato.com> |
|---|---|
| Date | 2020-04-08 22:15 +0000 |
| Message-ID | <r6liek$lpv$5@dont-email.me> |
| In reply to | #64458 |
On 2020-04-08, Wildman <best_lay@yahoo.com> wrote: > On Wed, 08 Apr 2020 21:47:28 +0000, mGhost wrote: > >> On 2020-04-08, F Russell <fr@random.info> wrote: >>> On Wed, 08 Apr 2020 10:02:47 -0700, Bengt T wrote: >>> >>>> In my backup script, using rsync, some directories/files will not be processed >>>> because they are only accessible by root. My way around this is to use "sudo >>>> >>> >>> Your "way around" should be to boot up as the root user and >>> stay as the root user. >>> >>> For the single-user workstation this is the ONLY way. >>> >>> I still hear moans and groans about running as root but >>> all of that security nonsense is just that: nonsense. >>> They can always spout off with generalities but they >>> can never provide specific examples about how a single-user >>> workstation can be compromised by running as root. >>> >> >> Sure, the idea is that someone might craft a link which floods a buffer >> in such a way that the code they want to execute is sitting somewhere in >> memory where there exploit executes it. Without a privileged account, >> that execution would fail. With a root level user running, it executes >> and opens Pandora's box. >> >> You don't want to be the unknowing victim of some clever attacks where >> by you make their job even easier. It doesn't take much to open a port >> on your machine, to a command and control service if your own system >> doesn't even stop ask you if it should, which it won't if you're already >> root and as root, you interact with their exploit. >> >> What if I write a simple script, which looks normal to you, but the >> script loads more instructions from the web, which you don't see. It's >> not in the script you see, except for loading of it. You run it, and as >> root, I tell your system download an execute a cron job headlessly. And >> every 10 minutes you're machine asks my machine what I want it to do on >> my behalf. Not too fun. I could setup accounts, take screen shots, raid >> your files and upload them to me, grab you email, decrypt your encrypted >> files, encrypt your drive, and do pretty much anything I want. I'm root. > > Would not the person writting the script haved to be a > complete idiot? You create a script that opens a port > on the internet without you knowing it? Nonsense. > Let me be more clear. Say I KNOW you like to run as root all the time. And one day in conversation you ask for a script that does a certain thing. So I write it, and send it to you. It does what you asked, and a little more for me. Because you are root, it just obeys what I wrote without question or prompt. That's very dangerous. Here's another one. I make a link, and it is super long. I know specifically how many characters it will take to overflow a buffer, and what comes after that sits in your memory. That extra payload is now in your memory waiting to be executed. Maybe I make an okay button, which you click on, which is actually the execution of that memory. Again, you're root. So nothing stops and asks for permission. It just does what I said. It just executes the code in the memory location I specified. Again, I have compromised your system. With you running as root, it just obeys me. With you not running as root, I request to run something which requires root is met with a prompt asking you for permission or just failing to execute at all. Either way, you have a chance. You're just making it easier to be taken over. Normally I'd need some method of escalating my privilege. Here, I'd need not bother. See? Not nonsense at all. Running as root all the time is not smart. -- Я гость в отеле
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | alt.os.linux
csiph-web