Re: Did cockpit spawn superuser parameters change?

2023-01-19 Thread Mark Reynolds
On 1/19/23 8:49 AM, Martin Pitt wrote: Hello Mark, Mark Reynolds [2023-01-18 16:31 -0500]: So we've been using "superuser=true" for a long time now, and we have a customer issue where system users who have sudo rights don't seem to have privileges in Cockpit.  Looking at the do

Did cockpit spawn superuser parameters change?

2023-01-18 Thread Mark Reynolds
https://cockpit-project.org/guide/latest/cockpit-spawn So we've been using "superuser=true" for a long time now, and we have a customer issue where system users who have sudo rights don't seem to have privileges in Cockpit.  Looking at the docs it does not mention "true" anymore, but

Re: Need help with debugging cockpit plugin

2022-11-30 Thread Mark Reynolds
On 11/30/22 1:54 AM, Martin Pitt wrote: Hello Mark, Mark Reynolds [2022-11-29 13:31 -0500]: Then I create this directory: ~/.local/share/cockpit/389-console And create a link to it: [mareynol@fedora 389-console]$ ln -s $(pwd)/dist ~/.local/share/cockpit/389-console/ This creates a "

Need help with debugging cockpit plugin

2022-11-29 Thread Mark Reynolds
Hello, So our team has a Cockpit plugin we use for our server's UI. Since I've setup my new laptop with F36 the method I've been using for a long time to make live changes to the plugin stopped working.  Here is what I was doing: See our code here:

Re: Problem running shell command in spawn()

2021-08-27 Thread Mark Reynolds
On 8/27/21 11:32 AM, Martin Pitt wrote: Hello Mark, I'm afraid I have no further idea about the original bug -- at this point I'd need to try this code and reproduce. But.. Mark Reynolds [2021-08-26 8:54 -0400]:    let cmd

Re: Problem running shell command in spawn()

2021-08-26 Thread Mark Reynolds
On 8/26/21 6:43 AM, Martin Pitt wrote: Hello Mark, Mark Reynolds [2021-08-25 12:38 -0400]: This code used to work for a long time, but now it stopped working as expected:     let cmd = [     "/bin/sh",     "-c", I can't possibly believe that ' vs. " has a

Re: Problem running shell command in spawn(), fixed...

2021-08-26 Thread Mark Reynolds
On 8/26/21 5:15 AM, Stef Walter wrote: On Wed, Aug 25, 2021 at 8:51 PM Mark Reynolds <mailto:mreyno...@redhat.com>> wrote: Well I tried a lot of different things, but for some reason switching the first two items to use single quotes instead of double quotes got it

Re: Problem running shell command in spawn(), fixed...

2021-08-25 Thread Mark Reynolds
in/sh", -    "-c", +    '/bin/sh', '-c', '/usr/bin/echo -e "' + setup_inf + '" >> ' + setup_file      ]; Mark On 8

Problem running shell command in spawn()

2021-08-25 Thread Mark Reynolds
This code used to work for a long time, but now it stopped working as expected:     let cmd = [     "/bin/sh",     "-c",     '/usr/bin/echo TEST >> ' + setup_file     ];     cockpit.spawn (cmd, { superuser: true, err: "message" }) Now the output file (setup_file) is empty. When

Pass value to cockpit.spawn that can be retrieved in done()/fail() ?

2018-06-18 Thread Mark Reynolds
Hello, So I need to loop over a bunch of cockpit.spawns, but after each one is done I need to print a success message     for (var attr in mods){   var cmd = [DSCONF, '-j', 'ldapi://%2fvar%2frun%2f' + server_id + '.socket','config', 'replace'];   cmd.push(attr + "=" + mods[attr]);  

Re: Questions about file watching

2018-03-07 Thread Mark Reynolds
Thanks for the response Martin and Stef! Adding: { superuser: "try" } worked - thanks!  But I was worried about the "tailing" functionality of watch so I'll now purse the manual tailing approach :-) Thanks again, Mark On 03/07/2018 10:27 AM, Stef Walter wrote: > On

Questions about file watching

2018-03-07 Thread Mark Reynolds
Hello, So I am running into two issues with file watching on cockpit-151-2 [1]  The first one appears to be a permissions issue.  So I am trying to watch a file that the Cockpit user does have immediate permissions to, but the Cockpit user does have sudo rights.  When I try to watch the file, I

Does cockpit offer a scp feature?

2017-11-30 Thread Mark Reynolds
Hello, Is there a cockpit API/feature that allows you to copy files from one machine to another (like scp)?  I didn't seen anything in the docs.  I could do a cockpit.spawn and use scp that way(I think), but I'm wondering if there is a better way. Thanks, Mark

Re: Odd cockpit.spawn() behavior

2017-11-15 Thread Mark Reynolds
On 11/15/2017 09:53 AM, Stef Walter wrote: > Wildcards are expanded by a shell, so you want: > > On 15.11.2017 15:43, Mark Reynolds wrote: >> Basically if I try to use wildcards or pipes things seem to break: >>>     var cmd = ["/usr/bin/ls", "/etc/dirsrv

Re: Need help with new package: JS vs CSP

2017-11-10 Thread Mark Reynolds
Hmmm, I already sent you all my code, not sure why it didn't show up on the list.  I'll send it directly to you... On 11/10/2017 04:22 PM, Peter wrote: > I can probably send you a sample. Got any code you can share? Using > any particular JS framework? > > > On 11/10/2017 01:01 PM