Search found 203 matches

by afora
Wed Jan 15, 2020 12:25 am
Forum: Newbie Questions
Topic: [SOLVED] sudoer groups question
Replies: 4
Views: 159

Re: sudoer groups question

I need to load the job as a user-owned job, and run that job passwordless prefixing with sudo. More info is here: viewtopic.php?f=90&t=309519.
by afora
Wed Jan 15, 2020 12:17 am
Forum: Newbie Questions
Topic: [SOLVED] sudoer groups question
Replies: 4
Views: 159

[SOLVED] sudoer groups question

I have several machines with different user names set in them. I wanted to setup a NOPASSWD sudoer directive in all of them which would run a daily script as a cron job. Obviously irrespective of their user name (i.e. I don't want to hardcode it on each machine). I add the cron job as a user crontab...
by afora
Wed Jan 15, 2020 12:09 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

SOLUTION (thanks to rene): Use either #!/bin/sh or #!/bin/bash in the script that is called by cron. On my system either worked. Create a sudoer directive either in sudo visudo or as a separate file e.g /etc/sudoers.d/admin-daily-online . Add the following directive in either sudo visudo or /etc/sud...
by afora
Tue Jan 14, 2020 11:52 pm
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

Thanks rene, without your suggestions I would not be able to find the solution. The culprit was, As to the cronjob needing to run as root you'd start it (or things in it) through sudo, giving permission to do so non-interactively through creating a file /etc/sudoers.d/admin-daily-online.sh with And ...
by afora
Tue Jan 14, 2020 10:47 pm
Forum: Newbie Questions
Topic: custom log files location and permissions
Replies: 3
Views: 123

custom log files location and permissions

i have an unattended sudo script which I implemented with sudoer which runs silently under the currently logged in user. I would like to save sout and serr to custom rooted log files which could be reviewed or emailed on demand. Now my dilemma is: If log files are saved under some expected location ...
by afora
Tue Jan 14, 2020 2:22 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

I tried all permutation of the post above, but with exactly the same result. The only thing which sort of made me go forward is to use the following syntax: sudo -S bash /usr/as/scripts/admin-daily-online.sh /usr/as/scripts >/usr/as/logs/log.txt 2>/usr/as/logs/error.txt or sudo -S /usr/as/scripts/ad...
by afora
Tue Jan 14, 2020 2:11 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

I got what was suggested, and while the cron job runs perfectly fine with a regular, non sudo run: bash /usr/as/scripts/admin-daily-online.sh /usr/as/scripts >/usr/as/logs/log.txt 2>/usr/as/logs/error.txt when I run it with sudo sudo bash /usr/as/scripts/admin-daily-online.sh /usr/as/scripts >/usr/a...
by afora
Tue Jan 14, 2020 1:24 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

Thanks rene, it seems as if it's the right way to do this! And regarding the syntax of sudoers: you suggested this: afora ALL=(ALL) NOPASSWD: /usr/as/scripts/admin-daily-online.sh while one of the current entries under mintupdate offers this: ALL ALL = NOPASSWD:/usr/bin/mint-refresh-cache Can I just...
by afora
Tue Jan 14, 2020 1:09 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

Re: Returning $USER in a sudo started cron job

Well, regardless of which way, I was after a way to start a cron job that would run: * with a few sudo commands without prompting the user for the root password * would have access to the user's space (two locations: /home/$USER/ and /mount/$USER/media/) Can you recommend perhaps a solution to this?...
by afora
Tue Jan 14, 2020 12:29 am
Forum: Newbie Questions
Topic: [SOLVED] Returning $USER in a sudo started cron job
Replies: 15
Views: 542

[SOLVED] Returning $USER in a sudo started cron job

I'm trying to get the username of the account who was logged on when the sudo cron job loaded like this ran: min=12 hour=15 command="bash /usr/as/scripts/admin-daily-online.sh /usr/as/scripts > /usr/as/logs/log.txt 2> /usr/as/logs/error.txt" (sudo crontab -l ; echo "$min $hour * * * $command") | sud...
by afora
Sat Jan 04, 2020 11:37 pm
Forum: Newbie Questions
Topic: [SOLVED] Firewall configuration with apache2
Replies: 0
Views: 143

[SOLVED] Firewall configuration with apache2

SOLUTION: Yes, it's fine ---------------------------------------------------------------------------------------------------- Can I double check with you if I'm not doing anything obviously stupid to you? I have * an apache2 server running on 192.168.1.10 listening to port 80 * configured ufw to den...
by afora
Sat Jan 04, 2020 5:37 am
Forum: Newbie Questions
Topic: [SOLVED] How safe is wine - is it a PPA package?
Replies: 7
Views: 346

Re: [SOLVED] How safe is wine - is it a PPA package?

My thoughts too + it's ridiculously unstable.
by afora
Sat Jan 04, 2020 5:08 am
Forum: Newbie Questions
Topic: [SOLVED] How safe is wine - is it a PPA package?
Replies: 7
Views: 346

Re: How safe is wine - is it a PPA package?

My decision is stay away from Wine and try out virtualisation.

Plenty of useful info in this thread:
https://ubuntuforums.org/showthread.php?t=2420845
by afora
Sat Jan 04, 2020 2:46 am
Forum: Newbie Questions
Topic: [SOLVED] How safe is wine - is it a PPA package?
Replies: 7
Views: 346

Re: How safe is wine - is it a PPA package?

Thanks smurphos, I played around with wine, and I managed to install it as the article describes. However, after it's run for the very first time, it shows two pop up windows offering to download two packages from the internet outside the usual apt distribution infrastructure: mono-complete wine-gec...
by afora
Wed Jan 01, 2020 12:19 am
Forum: Newbie Questions
Topic: [SOLVED] How safe is wine - is it a PPA package?
Replies: 7
Views: 346

[SOLVED] How safe is wine - is it a PPA package?

Hi guys, just was trying to get wine over onto my machine when I noticed that it may be a PPA package. I think I mentioned this before that a couple of people whose opinion I value refuse to ever install any PPA package due to potential security concerns. I understand that millions of linux user hav...
by afora
Thu Dec 26, 2019 5:57 am
Forum: Newbie Questions
Topic: [SOLVED] adding file emblem in shell script
Replies: 9
Views: 395

Re: [SOLVED] adding file emblem in shell script

Lol, no no I understand this. But this is a bit circular as you are looking for something you already know is there (i.e. unset). I.e. in this particular case, it's magic, just as you did not want to claim. :D I.e. I did not stand a chance.
by afora
Thu Dec 26, 2019 5:45 am
Forum: Software & Applications
Topic: Change Xed shortcut
Replies: 4
Views: 785

Re: Change Xed shortcut

Bug report raised - https://github.com/linuxmint/xed/issues/335 The bug is closed now. I love this: it's something that's likely not well-supported now considering the direction that Gnome has been heading for the last decade or so I really need to think about changing xed to something more user fr...
by afora
Thu Dec 26, 2019 5:25 am
Forum: Newbie Questions
Topic: [SOLVED] Day Zero time horizon: worst case scenarios
Replies: 4
Views: 146

Re: Day Zero time horizon: worst case scenarios

Lol, something like that.

Plus persistent attacks on the static IP given it takes time to download updates accumulated over several months during the refresh.
by afora
Thu Dec 26, 2019 4:24 am
Forum: Newbie Questions
Topic: [SOLVED] Day Zero time horizon: worst case scenarios
Replies: 4
Views: 146

Re: Day Zero time horizon: worst case scenarios

No no, not delaying updates, they are applied as available.

I meant image refreshing, i.e. reverting to an image from X months ago with all current updates applied prior to deployment. I just need a practical window for X to balance extra work vs security.

Go to advanced search