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)

-6
votes
1answer
35 views

Trying to understand linux script [on hold]

I have this Linux script I found and I'm trying to understand it. Could someone please help me to understand it. The script if [ ! -d "/home/ftp/$PAM_USER" ]; then /bin/su - ftp -s /bin/sh -c ...
0
votes
2answers
636 views

How can I convert a UNICODE word to an International Domain Name? (and back) [on hold]

I want to convert a few Unicode words to an International Domain Name, (and back) but can't find a script or other resource to do it on a Windows PC. Does anyone have such a tool?
-3
votes
1answer
29 views

bash script mysql reset pass

It seems that this code is not working I tried using it on my debian 7 machine and the password it gives me is wrong. # Please confirm that you want to reset the MySQL passwords CONFIRM="n" echo -n ...
0
votes
1answer
311 views

How do I run a process remotely from inside a shell script?

What I am trying to do is to run the shell script 'ABCDE' on one machine, but use another machine to support it. ABCDE is an all-in-one ripper/encoder/tagger script for turning CD's into digital ...
1
vote
2answers
306 views

Ola Hallengren's SQL Backup to Network Location not working

Good Evening All, I have set up Ola Hallengren's SQL Server Maintenance Solution on several SQL Express servers (2008 to 2012 R2) in the past few years. I recently have started having issues with the ...
1
vote
1answer
14 views

Configuring Pfsense via ssh

I want to know how i can completely configure and add add tables to pfsense via ssh. my goal is to have a web installer that configured multiple system and based on the output it will configure the ...
0
votes
1answer
1k views

How do I delete a remote file using NCFTP (Windows client)?

With ncftpput.exe how do I delete a remote file once logged in? I have tried using the -W option to send a Raw FTP command but cannot get it to work. Has anyone got a working example? Have tried ...
1
vote
1answer
46 views

SSH issues: keyfile and host file not working as expected

When I login to server with a key ssh -i /home/me/.ssh/id_rsa server everything goes without glitch. The key is authorized on the server. However if I try to do same from a shell script, I get a ...
0
votes
1answer
42 views

Assigning Department based on Active Directory OU's

We have just gone to Office 365 tied in with ADFS. We want to be able to see people's departments automatically when we view their contact info in Office 365. We do not have any Department ...
-3
votes
0answers
25 views

What you want to see in daily linux server monitoring mail? [closed]

I write bash script, which collect information from ubuntu server and send it by mail. With this script you can see: Your clamav antivirus information Which ports are open How many users in your ...
20
votes
5answers
17k views

What is “-bash: !”: event not found"

Try executing the following under a bash shell echo "Reboot your instance!" On my installation: root@domU-12-31-39-04-11-83:/usr/local/bin# bash --version GNU bash, version 4.1.5(1)-release ...
10
votes
5answers
2k views

Where do you normally keep your UNIX/Linux scripts?

There are numerous scripts that I have written for my server. Some of them are in my ~/scripts and some of them are in application directories. I am just wondering is there a directory that you would ...
0
votes
0answers
17 views

Programatically Pull Account Track Data from Konica Minolta/Ricoh Copy Machines

To be safe, I checked the serverfault guidelines, and I think this question falls under management of 3rd party platforms or administration of networks. I'm sure I'm not the only sysadmin with this ...
1
vote
1answer
1k views

Windows Server 2008 x86 Services for Unix SDK (SUA) RSH

Running RSH commands on a Windows box against a Linux box works only for the administrator user. Is there a file somewhere that has a list of users that can run commands remotely? More Info The ...
1
vote
3answers
3k views

Automatically run a script on an uploaded FTP file

Is there a way to run a script over a file that has been uploaded on an FTP server. I am running ProFTP on the server and would like to process the uploaded files immediately after they are ...
2
votes
3answers
3k views

Use GRUB/GRUB2 to PXE boot OS image

Asked this in stackoverflow but they recommended I post this here: Here is the situation I am in: I currently have a Windows drive that boots XP. The BIOS does not support PXE booting so this is out ...
0
votes
1answer
46 views

Powershell script to display all groups and the users they contain [duplicate]

I'm currently trying to write a script that displays each group and user in the domain. Import-Module ActiveDirectory $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select ...
8
votes
10answers
7k views

Batch Query Dell Service Tags

Anyone know of a way to get a bunch of information for a list of service tags, does Dell have a section on their site for this? I would also be open to any Perl / Python libraries or *nix shell ...
1
vote
2answers
1k views

List of groups and users on Windows 2003 Server

I am setting up a user group and user audit/review process. For this I am looking for a script that can easily generate a list of groups and the assigned users. E.g.: Administrators/Administrator ...
1
vote
2answers
147 views

How to automate GPG file decryption over SSH?

I would like to use GnuPG to decrypt short messages that are stored on a remote host (running Linux), i.e.: ssh [<user>@]<host> gpg -d <file-to-decrypt> interact with gpg-agent ...
4
votes
1answer
3k views

How can I find all groups a user belongs to via DSQUERY

How can I find all groups for a specific user (groups for which the user is assigned) using dsquery?
0
votes
2answers
437 views

Is there a way to restart automatically the HHVM service if I get a '502 Bad Gateway Error'?

I've reported the error on stackoverflow - from time to time my Nginx/PageSpeed+HHVM+MariaDB+WordPress blog stops working. There is some problem with the HHVM service that I don't locate, and I'm ...
2
votes
1answer
36 views

How to make BSDP NetBoot image selection from a script on OS X 10.9+?

Background: BSDP is Apple's protocol used to discover and make selections on NetBoot servers on the network (Not to be confused with PC-style PXE boot). specs (Word doc). Long story short - it's a ...
1
vote
2answers
856 views

How can you add a command line test to Jenkins that reads the exit code?

I want to add a command line script to Jenkins as part of the build process. This command line script will exit with an error code of 0 if things where successful or 666 if it fails. I wish to stop ...
0
votes
0answers
16 views

Can I dynamically generate apache config files without using <perl> tag? Similar alternatives are an option

I am trying to find a way to dynamically generate vhost configurations when Apache starts. I am aware of mod_vhost_alias and mod_rewrite [suggested by Apache][1]. I'm afraid these won't work since ...
-1
votes
0answers
20 views

PSExec running even though commented

I have a batch script where PSExec is commented. The problem I have is that, even though it is commented, it still executes. I tried the options of :: and REM of commenting, but still executes. Please ...
0
votes
0answers
18 views

Different result from a bash function [migrated]

I am trying to code a script to log all commands executed on a server, currently I have 2 versions: (simplified version of the scripts) Version 1: function fc { fc -ln -0 } trap fc DEBUG ...
0
votes
0answers
6 views

VLC script on ubuntu server [migrated]

I need a small script which run three vlc command on the same time (on Ubuntu server 14.04) as stated below: #!/bin/sh cvlc -vvv v1 --sout ...
5
votes
2answers
1k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
4
votes
2answers
2k 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
35 views

name of script within a init script

I have a script /etc/init.d/startup, where I do the following: creating a PID file that should look like: /var/run/**startup**.pid executing a screen of a java process, so I will like to create the ...
10
votes
7answers
24k views

Tool to test a user account and password (test login)

Yeah, I can fire up a VM or remote into something and try the password...I know...but is there a tool or script that will simulate a login just enough to confirm or deny that the password is correct? ...
1
vote
2answers
46 views

Linux: How to allow a regular user to “su - anotherUser”?

I wrote a Nagios check script which checks if user peeradmin is able to touch a file in some mount on the server. Nagios user is: nagios . I've edited /etc/sudoers and added these lines but none ...
0
votes
0answers
21 views

Collecting PC to Printer relationship information across an entire domain using a script

I'm trying to create a script which will enable view every PC to Printer relationship across an entire domain of around 1200 machines. In theory I am looking for a script to be run so that it will ...
2
votes
1answer
149 views

add certificate to all files in EFS-folder with script

I try to set up collective access to EFS-folder. I want to add certificates of all users to all files in folder. Is it posible do with using powershell scripts or some another way? Thanks.
0
votes
1answer
127 views

sync a file over 2 servers and switch between what server is being connected to

I do not know for sure if this is the correct location to post this, but I am looking for software or a script to be able to do what I am wanting... or if anyone has anything better. In short, there ...
0
votes
1answer
65 views

Script to Push Files

Script to Push Files Hey Guys, Thanks for always being helpful, I have another issue that I need a little insight on how to fix. See the below script I have and the error I get. I don't understand ...
2
votes
0answers
97 views

How to retrieve a MDT task sequence variable and use it properly inside Powershell

I'm trying to retrieve a MDT task sequence variable inside a Powershell script, then use that variable in a Powershell function. My problem lies in that the variable I want to retrieve contains a ...
0
votes
0answers
138 views

Batch/Powershell file wont run via Task Scheduler during logoff

I'm having trouble getting my Powershell file to run from Task Schedule during logoff. In short, I'm trying to upload my NTUSER.DAT (roaming profile) to my profiles folder on the file server. Dynamic ...
0
votes
1answer
75 views

Efficient way to parse Apache Access Log for CMS logins

I've been working on a way to parse large multiple access logs (sometimes in double digit GB in size) for CMSs. Right now I just need WordPress and Joomla, but I know the types will grow over time. ...
0
votes
1answer
35 views

Check how much time has elapsed for Cron job and send email

There is a cron job that is set which runs throughout most of the day, sometimes the job gets stuck and I would like to set a time or check on it which let's me know if it has been stuck for more than ...
17
votes
7answers
18k views

How do I run a local bash script on remote machines via ssh?

I am looking for a way to push configuration from one central machine to several remote machines without the need to install anything on the remote machines. The aim is to do something like you ...
0
votes
1answer
46 views

Powershell cmdlet requesting optional parameters as mandatory when running as script

I am trying to use powershell to create a script which I use to add vpn connections to windows 8.1 machines. For this microsoft has made the add-vpnconnection cmdlet. When running add-vpnconnection ...
0
votes
2answers
68 views

Using Puppet to sync two directories

I have a bunch of servers that have two directories on them that need to be in sync. For instance, on the same server i might have /var/path/to/dir1 and /var/path/to/dir2 which could have files and ...
0
votes
2answers
81 views

For Loop in batch file [closed]

Expected Input: Start=1, End=500, Interval=100 Expected Output: 1, 100 101, 200 201, 300 301, 400 401, 500 @echo off set start=1 set end=500 set interval=100 for /L %%g in (%start%, ...
2
votes
1answer
276 views

Powershell script scheduled task will not end

I want to use this Powershell script to automate some backups on Win7 machines. When run manually from the Powershell terminal the script runs as advertised and ends after a few seconds (it is a small ...
-2
votes
1answer
79 views

How to automate a java service to start if server restarts

I normally run my java service on centOS box using nohup like below: nohup java -jar myapp-0.0.1-SNAPSHOT.jar server my-configure.yml > outfile & However, if the server restarts the service ...
13
votes
5answers
19k views

How can I check the build status of a Jenkins build from the command line?

In trying to make doing the right thing easy, I'm looking for and making command line tools for our developers. I'm hoping to find a way that I can check the jenkins build status without switching to ...
4
votes
1answer
247 views

How to export a Full SMTP Log in Office 365

In Office 365, is it possible to export the SMTP log? Maybe in powershell or any other way. My goal is to have a complete overview of all messages send from and to a specific domain.
3
votes
4answers
4k views

Test for existence of an AD object in PowerShell using only Microsoft-provided cmdlets

I want to test for the existence of a computer account in Active Directory with PowerShell using only tools from Microsoft. Using Quest AD cmdlets, I can do this: if (!(get-qadcomputer $name)){ ...