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)

3
votes
3answers
1k views

Update a network driver through GPO/AD

Our organization has just deployed new computers with Windows 8.1. Roughly 50 of them. We've run into an issue with the driver on the new computers which is flooding the network with ipv6/multicast ...
5
votes
5answers
651 views

Bash: mv directory one at a time

I am trying to move all subdirectories of a folder to another share on the same server. If I do a mv *, I will run out of space since the folders are not removed until all folders get transferred. ...
1
vote
2answers
43 views

Debugging powershell init

My problem is that I just reinstalled my system and have installed heaps of packages via Chocolatey. However now when I launch powershell, something changes the fonst type and size inside the console ...
-1
votes
1answer
82 views

how to set linux hostname based on flashdisk volume label [closed]

i'am running live linux, which run from FAT32 flashdisk since i run a lot of pc using this flashdisk, its difficult to identify which IP for its hostname, since its ip need to be dynamically ...
2
votes
2answers
319 views

Get hostname from url using Trafficscript

I'm looking to get the hostname from a URL as it comes through Zeus and I've looked through the documentation on Trafficscript and it seems like the only option is regex. Doe Trafficscript have a ...
1
vote
0answers
212 views

Openvpn-server: Execute a script when on a failed connection?

Good morning, I was wondering if It was possible to setup something to execute a script when someone tried to connect but the TLS check failed (When someone who is not supposed to connected try to° ...
1
vote
1answer
44 views

Updating usernames and passwords for 450 WordPress databases - 450 ftp Accounts and 450 MySQL user

How would you update these in a consistent, reliable manner? I'm new enough to system administration, self taught and still learning but - I have this problem to solve in no specific time and under my ...
1
vote
0answers
38 views

Using Windows as middle for migrating between two Linux machines

We're developing a tool that will do a migration between some platforms. Both source and/or destination servers can be Windows or Linux. The tool is currently built in .NET and we'd like to keep it ...
0
votes
1answer
65 views

Script to apply Simple Finder restrictions to Mac OS X user?

Is it possible to script (e.g. with AppleScript or bash shell script) applying the Simple Finder and an associated application whitelist to a local user account on Mac OS X? We are using Mac OS X ...
0
votes
1answer
144 views

Create a trigger when a mobile connects at network [closed]

I'm a complete dummie on Network subjects. I'm trying to create a log, when a specific iPhone/Cellphone connects into a wireless network. The main goal is pull a trigger (create a log file, send a ...
0
votes
1answer
141 views

Curl pressing enter or ctr+c in order to have the right response [closed]

This is a script that checks my current ip on this site: http://myip.dnsdynamic.org/ and pick the response and calls an API in order to update my dynamic ip. Here the script: curl --user ...
0
votes
3answers
703 views

Exclude with the find command [duplicate]

I need some help getting the find command to work right in a script working on. I need to be able to exclude some directories. Below I have what I'm doing as a work around. sudo find / ( -name ...
1
vote
1answer
2k views

GPO: User logon script not running

I have a GPO that is linked to an OU containing computers. Loopback processing is activated an set to merge. Within the user part of the GPO i have a powershell script defined that basically checks if ...
-1
votes
1answer
133 views

Make a copy of email using pipe in postfix alongside 1 content_filter

I am using postfix and already usHi. I am using postfix and already using a script as a content_filter which re-injects back to smtpd to all users, but before this happens, I would like to make a copy ...
3
votes
2answers
544 views

Redirect to 404 if filename passed as parameter does not exitsts

I have special parameter data=/path/to/filename.htm in uri. Its old and rusty site builded on SSI, and I can't modify it. Problem is when filename passed as arg_data not exists, page is broken. I ...
2
votes
2answers
5k views

Powershell: Single Script to “clean” multiple folders of files older than

I would like to create a maintenance script that would run on each of our servers to clean out common drop/archive directories. Preferably the script would use a reference file for the folder path ...
1
vote
1answer
27 views

How to get a debug output from the find command?

I have the following find command: find /home/ -type d -name "something" what I want to achieve is to know which directory/file is checked by the find command no matter the fact that it does or ...
4
votes
2answers
324 views

OK to modify HKLM\Software\Policies and HKCU\SOFTWARE\Policies on a domain?

Background: I have a domain (2003 Functional Level) with a mix of Windows XP and Windows 7 clients. We have been using Group Policy to manage our workstations. Now, I am in a situation I need to ...
10
votes
3answers
2k views

Deploying Printers via GPO/GPP - is there a programmatic option?

For reasons beyond my control, I've been tasked with setting up GPO/GPPs to deploy our 100+ printers to our 1000+ clients. The good news is that we have over a dozen sites, and for the most part, I'm ...
5
votes
2answers
607 views

Is there a way to script the installation of System Center Configuration Manager updates listed in Software Center?

We have a very tight outage window and for many of our systems, the servers must be rebooted in the correct order. Because of this, I would like to script our updates. I have attempted to use this ...
5
votes
3answers
4k views

Is it possible to use Puppet to ensure multiple files in a directory are present without defining all of them?

I have a couple hundred one-off servers that have different configuration files that need to be present in a directory. Copies of the files reside on the puppet master. Within one of my classes I ...
1
vote
1answer
111 views

Will a Scheduled Task On Windows Server 2008 R2 work correctly if windows are opened and closed?

I have a batch script that I am currently running on my own Windows 7 computer as a scheduled task. The task runs nightly when my computer is locked. The task launches an Progress OpenEdge session ...
3
votes
1answer
683 views

Change shortcut arguments via script

We have a program here that requires every user to have a shortcut on their desktop that points to an ini file. Each file is unique to the user. Recently, we've done a new install of the application ...
-1
votes
1answer
388 views

File server access via IIS 8 WebDAV using SSL and cert-based auth

I have: A hole in the corporate firewall allowing me to accept incoming connections on ports 80 and 443 Exactly one domain name for external web access No access to corporate DNS settings An onsite ...
0
votes
2answers
299 views

Execute script on remote machine which is not in windows domain?

Requirement: As part of deployment procedure I have to execute scripts on target servers. Problems: I don't want to log-in into every server using RDP just to execute a script. Some servers are not ...
2
votes
1answer
99 views

Bash: delete old files except one

I am using the following command to delete old backup files: find backups/ -name "bak_*.tbz" -mmin +4800 -exec rm -vf {} \; The problem: When there are no new files, than all files are deleted. I ...
1
vote
1answer
272 views

command to add permissions to a folder for a local user in windows server 2008

as part of an installer I need to create a user with limited permissions to add the user I will use net user "<username>" <password> /add /fullname:"<username>" I now need to ...
1
vote
0answers
612 views

Reconnect Windows Network Drive after network connection has been established

User uses a piece of software (simple database and front end app) that connects to a database stored on another workstation, by way of mapped drive. This mode of access is supported by the software ...
0
votes
1answer
154 views

Query in dsrm command

I need to remove 1000 computers from AD. I tried the script below, but it's not working. When I used dsmod to disable computers, in the same script, it works. @echo off set ...
3
votes
2answers
4k views

Remove all recurring meetings scheduled by terminated user

I am looking for a way to efficiently and effectively remove all meetings that a terminated user may have created during their tenure. Currently, our group has to grant admin access to the user's ...
0
votes
0answers
60 views

Get unused Nagios both services and commands

I have a monitoring server, based on Nagios 3.2.3, installed via source code, and using GroundWork Monitor Architect for managing Nagios configurations. My question is if possible (and how to) get a ...
1
vote
1answer
374 views

Kamailio to accept anonymous registrations/custom registration authorization? [closed]

As a minimum requirement, I need Kamailio to accept any login with an empty password. Ideally, I need to perform some simple validation of the login in a script (Lua/Python), and save the given login ...
0
votes
1answer
62 views

Parenthesis around value with Augeas lens?

How can I create an Augeas lens that will allow me to extract a value field from within a parenthesis? Background: I'm starting an Augeas lens for managing NASL files for OpenVAS. I need to be able ...
3
votes
2answers
2k views

Query Nagios status programmatically

I recently acquired a nice 7×11 LED display, and I want (among other stuff) display my nagios status on it. For that I need to query the status of my Nagios installation. What is the appropriate way ...
-1
votes
2answers
73 views

Trying to bind a port on a completely different IP yet says it is in use

My host has given me a range of usable IP's for example (10.1.2.100 - 10.1.2.105). These did not come pre-bound to the OS, so I manually had to bind them. The only problem I am having is that when I ...
1
vote
1answer
136 views

iptables arp compare and execute

EXAMPLE: iptables :internet - [0:0] -A internet -m mac --mac-source 48:5D:60:FC:29:B0 -j RETURN COMMIT [root@localhost:~ ] $ arp Address HWtype HWaddress Flags Mask ...
1
vote
2answers
207 views

How to set ip address permanently

This might sound a little strange, but I try to achieve to set up an ip address permanently in Ubuntu using the command line, but not an editor. My idea is to provision servers and just type in the ...
2
votes
0answers
128 views

vmware thin disk usage powercli

I want to ask a question about thin provisioning. get-vm commandlet can easly give us real space used by a vm totally. Assume that you have a virtual machine which has more than one thin disk. If ...
2
votes
2answers
274 views

Router config export via expect script - username in enable?

I'm working on an Expect script for pulling configuration information from my hosts. The problem is that some of my hosts (when the enable command is entered) will prompt for both a login and ...
0
votes
1answer
123 views

Complex retention policy

I have daily database backups scp'd to a directory on a local linux machine for multiple databases. The naming format is [dbname].backup; there is no timestamp and currently the latest backup ...
-1
votes
2answers
136 views

Python script to log name, date, and command of every command users have entered

I want to create a script, possibly in python, open to suggestions, it logs every command typed on the server. so it would log, user, timestamp and command. Is this possible?
2
votes
1answer
859 views

Automatically assign elastic IP to ec2 spot instance with user data script

Is it possible to automatically assign an Elastic IP address to a spot instance that has a persistent spot request using the 'Advanced' 'User Data' script box? I'm thinking that I could craft a ...
1
vote
2answers
386 views

Terminal Server logon script on first logon only?

I'm currently building up a Windows Server 2008 R2 for use as a terminal server, and I'm looking for options on scripting. I know how I can attach logon scripts to the user in Active Directory, or to ...
0
votes
1answer
194 views

Executing CScript scripts from an ASP script fails

Context: Windows Server 2003; IIS 5 I'm trying to launch a JScript file from within an IIS application. I keep getting Permission denied 70 0 Microsoft VBScript runtime error Just in case you're ...
1
vote
1answer
72 views

cp/rsync command with destination as symlink to a directory

I am working on a cPanel backup solution at the moment. We are now informed about this exploit. Exploit : Full ROOT ACCESS to server 1.) create malicious file from, normal user account: mkdir root ...
1
vote
1answer
310 views

How to supply custom init script to Azure instance

Is it possible to create an instance specific init script and pass it to a virtual machine that is created via the API of Microsoft Azure? I know this from AWS, but could not find a way to do this on ...
0
votes
1answer
473 views

Disable “Windows Firewall with Advanced Security” for all profiles(Domain,Public,Standard) in local GP using script help! Windows 7 Clients

We need Windows7 with windows firewall to be turned off , so the GOLD image has windows firewall turned off for all profiles(Domain,Public,Standard) and Windows Service disabled No the same GOLD ...
0
votes
1answer
753 views

Is it possible to auto update php.ini via a bash script? [closed]

I'm trying to write an install script and i need to change the sendmail line in php.ini but I want to do this automatically at the moment I'm doing this manually: sudo nano ...
1
vote
2answers
130 views

postfix smtp relay script

I have a Postfix server and using it with Outlook (POP/SMTP). I have different sender addresses for an account. Now I want to configure a relay for a specific sender address. For example I have ...
-1
votes
1answer
63 views

How to loop specific powershell script

I need to uninstall Java from several computers in my network. After almost all day of Googling it seems the best way to do this is with a Powershell script. I found one that I have tested on a few ...