A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

learn more… | top users | synonyms (2)

0
votes
0answers
7 views

Speed of opendir readdir stat vs dir listing [migrated]

I have a Perl script that is using opendir to read the contents of a directory: opendir ( DIR, $path ) or next; while (my $file = readdir DIR) { Then I'm doing: -s $file to get the size of ...
1
vote
1answer
73 views

Log requests for a specific location

Have the same problem. Tried with named location, but i always get the same thing, access log created for specific location (/calendar) is empty, and logs are stored in general access log (/) in a ...
-1
votes
1answer
35 views

create folder from a list

i need to create a personal folder for each user of my company. I've tried to create a batch script using ND command and it works just with name folder without . (dot) The name of each folder ...
-1
votes
1answer
31 views

Powershell script to take and delete snapshots

Im new to powershell and i want to create a script to take a snapshot of all the running vm's and delete the snapshots that have more than lest say 5 days. What i have is this: $Time = 5 $VMs = ...
-1
votes
1answer
44 views

service script for any linux dist… possible?

I'm developing an app which will be run on linux. It can run on most distributions. Is there any way to create a startup/service script that will work on any distribution? I've read about /etc/init.d ...
0
votes
0answers
24 views

How do I set domain machines to ignore domain in login credentials?

Basically, some machines will allow remote access with an incorrect domain but correct username and password, but others won't. How do I set a server TO do that? My issue is that I have a host ...
1
vote
1answer
51 views

linux command has different behaviour in script

(Question SOLVED and edited for helping someone else that need it or have the same mistake, now with the code in the post for better readability) I am trying to create a script that does something if ...
0
votes
0answers
16 views

How to automate tasks for non-techies like customer support?

Our Customer Support often needs small changes to our system. These are things that a dev does by running a tiny script, but that's out-of-reach for CS. I'd like to be able to make those scripts ...
-1
votes
1answer
66 views

“Ipcalc -n ipv6_addr” command is giving error

I am trying to calculate network address of Ip address by using Ipcalc command. when i am using ipcalc -n ipv4 address,then it is running fine and give the network address for the IPv4. But when i ...
0
votes
1answer
30 views

Same script, same OS, same installation, failing

So I'm working with RANCID to monitor some switches and I'm using clogin now to test some modifications. I'm working in two different computers but both of them from the office. Althought they are ...
-1
votes
2answers
37 views

Script to delete older files and copy what is left

We have a server that runs an application that is used internally. The application has a utility that creates its own backups every 24 hours. Backups are stored in: ...
0
votes
0answers
10 views

MRTG Target field

Can I use OID and Shell Script in the MRTG Target field at the same time? For example Target[myrouter]: check_connection.sh&1.3.6.1.4.1.999.1:public@mydevice Please advise. Thanks
0
votes
1answer
33 views

Log all bash actions with multiple scripts

Using the command below, I can log all actions that happened inside that script. bash -x script.sh Sadly, the script calls another script, which does not have the -x setting active then, i.e. the ...
0
votes
0answers
61 views

Python to change password for user in JunOS device

My script is good to make device changes but the only thing im unable to do is to change the password one a particular user. Im running JunOS set system login user user authentication ...
1
vote
0answers
28 views

Command after apt-get install is not executing in script

I'm writing a script which is meant to initially set up my Droplet. In the script, I'm opening ssh connection with my Ubuntu 14.04 server as follows (with USER and REMOTE variables previously ...
0
votes
0answers
9 views

How to correctly process backups from webdav folder

So I have a GNU/linux server running apache with mod_dav. Users can upload their backups into their respective user folder. I would like to write a scanner that scans those directories and passis it ...
2
votes
1answer
109 views

Script to List all Desktop and Laptop Model for Server 2008 Domain

Is there any way I can list all the desktop and laptop model? There is no naming convention and I'm having difficulty differentiating laptop and desktop in our environment. I have already tried to ...
1
vote
1answer
86 views

How to hide command window at while running powershell script through the task scheduler?

I have powershell script with GUI form which show message by condition. This script is runnig through the task scheduler every 15 minutes. Every running shows me concole window, then GUI form with ...
0
votes
0answers
20 views

Bat file stops after invoking psexec

I want to have a simple bat files that prompts for the workstation name, uses psexec to connect to the remote computer and then run a script on the pc so I can check the results. If I run each line ...
-1
votes
1answer
28 views

env not working in FreeBSD cronjob [duplicate]

On my FreeBSD server, I have setup a cron script for backups using Duplicity. This script is as follows: #!/bin/sh export PASSPHRASE= export FTP_PASSWORD= keyid= remote= excludelist= ...
0
votes
1answer
30 views

Expect Scripting Issue Reading From File

I am trying to change the password for a user on a bunch of linux based routers pulling IPs from a list. The iplist.txt is just a list of ips (one per line). This is the code I am trying to use: ...
0
votes
0answers
40 views

Preprocessor for Dockerfile with variables and include files

I have been using docker for a number of my applications now. I have gotten to the point that I have about a dozen dockerfiles. Frequently I have to make the same change or include something in a ...
-1
votes
1answer
46 views

create an array of dates in bash scripts and match it with current date [duplicate]

Actually i want to create an array of dates and compare it to the today date if it match with the current date then execute test.sh file otherwise exit the loop in bash script. I did like this... ...
-3
votes
2answers
52 views

How to compare today's date against an array of dates [closed]

I want to create an array of dates and compare it to today's date if it matches then execute test.sh file otherwise exit the loop in bash script. I have this so far: #!/bin/bash now=$(date +%Y-%m-%d) ...
0
votes
0answers
67 views

Tracking network activity for user login/logout/session timeout/session expired

Porting from StackOverflow (35741797), since it might be a bit more relevant here as it is related to network. We have a situation on our side where we are trying to trace the login/logout/session ...
-4
votes
2answers
43 views

execute bash script on last thursday of every month [closed]

Actually i have a bash script file and i want to execute it on the last thursday of every month please help me to find out the proper solution of that problem using bash scripting.
0
votes
1answer
131 views

Expect script too fast: add a sleep between each line read from a file

I am trying to automate switch commands. It's almost all good, but when the expect script reads each line from the file containing my switch commands (listed line by line), the switch seems to stop ...
0
votes
2answers
30 views

batch usb letter execute command

I have and batch script to execute a command to delete several ext. Example: set /p drive=Choose the letter of usb: if %drive%== E goto E Example (if you choose E) E: del /f /q E:\*.lnk *.inf ...
3
votes
0answers
79 views

How can I programmatically unbind IPv6 from a network interface on a Windows 7 machine?

I need to unbind the IPv6 services from a number of client workstations running Windows 7. ("Untick" the selected box in the screenclip below.) For what it matters, they currently all have a ...
0
votes
1answer
49 views

printing a children's full tree recursively in bash script

sry for not being familiar with question conventions since im new here. i want to write a script that prints the full children's tree recursively of a given pid. i got so far as: ps h -ef | awk ...
0
votes
3answers
53 views

Matching first block of text from a file, between 2 strings

I'm trying to match only the first block of text between 2 strings: 'menuentry ' and '}' from a file as follows: Input file: (some irrelevant text) menuentry 'My Customized Linux, with Linux ...
0
votes
1answer
17 views

grep the result of cdrecord or wodim

I would like to parse the result/progress of a running cdrecord -v burn process. What I tried so far was cdrecord -v dev=/dev/sr0 -data foo.iso 2>&1 | grep -E 'Track [0-9]+:.*written'. ...
3
votes
2answers
52 views

Compare string on shell script

I'm creating a script to check the requirements about VM in one of my customer. The first part of the script is check if the OS is virtual or not. To achieve this goal I create the following script. ...
0
votes
3answers
56 views

What is the most suitable path on Windows workstations to store admin scripts? [closed]

We have a need for a GPO to store admin scripts locally on Windows workstations (7 and above), and I was wondering if Microsoft has any recommendations or if you have any experience or thoughts on ...
0
votes
1answer
22 views

When triggered, run script at top of the hour

I have a service that must be started at the top of the hour, any hour. Whenever that service goes down (during a reboot, etc) PRTG Network Monitor will know. PRTG has the ability to run a script when ...
0
votes
0answers
105 views

How to send an email with Powershell that doesn't end up in spam folder to Gmail?

I have various PowerShell scripts on Windows Server 2012 R2 that I like to notify me via email upon completion, so I setup a local SMTP server that is restricted to 127.0.0.1 only, and use this ...
0
votes
0answers
246 views

Get-AzureService : ForbiddenError: The server failed to authenticate the request

I am using azure workflow on azure automation and get the template from Azure gallery for "connect the azure using subscription certificate". After Create the connection "Azurec" and upload the ...
0
votes
0answers
32 views

how to execute bash script with args in parallel on all the remote server if the remote server in the from of pair

Please read carefully problem first and then give solution................... we are having 3 files in directory myscript.sh (the myscript.sh file contain many function and starts/stop to ...
1
vote
1answer
633 views

Add-AzureAccount : unknown_user_type: Unknown User Type on azure automation

I am getting following error on azure automation when I trying to connect VM. Also follow this link ...
-1
votes
2answers
76 views

shell script to open many terminals from a parent terminal and execute different cmds

I want to open 5 terminals from a parent terminal and place these terminals on the screen properly so that each terminal can be viewed properly at the same time. Also, i want to execute differnet ...
-3
votes
3answers
77 views

I want a user to run bash scripts with sudo [closed]

So this is for a school assignment. I have a working Bind9 and Apache2 server. I've written 3 scripts that make appropriate changes to the configuration files DNS add zone DNS add record HTTP add ...
1
vote
1answer
102 views

Access denied running gpo logon batch script executing reg add/query

I am using MS Server 2012 R2 64bit with Active Directory installed. I want to execute a few batch scripts when the user logs into a computer. These scripts use the "reg add/query" commands to check if ...
2
votes
0answers
70 views

How to determine the VM limits thresholds on CPU limit from inside a VM or VPS

I was asked to recently to verify that a purchased VM , was provisioned with the appropriate compute from a hosting company. I suspect they are throttling the machines access to the cpu at 8% or 10% ...
3
votes
2answers
414 views

Bash commands run at terminal but not in Jenkins/Bash Script

I'm using Jenkins to build and deploy HTML documentation to a local Apache web server for our devs to use. When I run the commands in the terminal, everything installs properly (Proving the server is ...
0
votes
1answer
71 views

Script to retrieve computer objects in specific AND display their respective OU's

I have an OU with many sub-OUs, each with an OU for computers. The highest level OU to start is 'Departments' with many sub-OU's. I need a script to retrieve all computers and list them in a table ...
0
votes
2answers
27 views

Using the output of a program as the contents of a file, dynamically

In Linux, I would like to create a file where the contents of the file are dynamically generated by the output of a program. The examples which already exist are /dev/random /dev/urandom, /dev/zero, ...
0
votes
2answers
157 views

Run a Logon Script for User Group for Domain Server

I've been searching for an hour and have not had any success so if I overlooked this as a previously answered question please let me know. I am trying to have a logon script that maps drives on all ...
-3
votes
1answer
52 views

How to remote onto networked PC using powershell [closed]

Is someone able to explain to me how I am able to connect onto a pc on the same network as my pc using powershell or a powershell script? for example my local pc is 192.168.1.250 and the remote pc is ...
0
votes
0answers
12 views

Query SIM status in Windows 2003 connected USB Modems

I have windows 2003 server installed and 4 USB Modems connected in different USB ports. It have some application installed which receives SMS from these modems and add them in data base its closed ...
1
vote
1answer
170 views

How to auto-run batch file as specific user (not scheduled task, not a duplicate)

I am an enterprise admin (Sr. Network Engineer), but my team does not manage Active Directory, so I am a little unfamiliar with policies and what is required to do what I am trying to achieve, and ...