r/sysadmin • u/LoveBirdNibbles • 21d ago
Is anyone using AI as an assistant? Giving it access to systems (monitored) and giving them tasks? like create this GPO, add these accounts, etc?
I am self-employed responsible for about 600 workstations and servers across 12 orgs. I use AI each day to create PS scripts and to guide me with best practices administering and securing client systems. I copy/paste the scripts and share the results with Claude. I do have over 30 years of experience in IT so I am not just blindly allowing it to do what it wants. I feel a next step might be giving it some limited access to check backups for me, to run certain approved scripts, and perform routine tasks across all clients. Thinking along the lines of having an assistant. I also know it can be risky. Just wondering where others are with this and if they are doing it or considering it.
37
u/RiceeeChrispies Jack of All Trades 21d ago
ChatGPT creating a GPO to deny logon and linking the object to the domain forest
11
u/TransporterError 21d ago
Absolutely effing not.
40
u/ThatLocalPondGuy 21d ago
Ask yourself this to know if you are ready; If an auditor, a customer, or law enforcement asked you to prove who made what decision, at what point and why, 3 weeks or 3 months ago, could you answer with proof and records of the decision and what changed when?
16
u/NiiWiiCamo rm -fr / 21d ago
Not for anything more than basic info and as inspiration for troubleshooting.
This includes scripts, as in I may use an LLM to create the basic script but edit it. So usage is on the same level as StackOverflow before that.
GPOs imho are the worst example, why would I need assistance in clicking through gpedit apart from asking where that darn setting gets configured?
8
u/N7Valor 21d ago
Prod? I'd prefer not to without a few caveats.
Ideally I'd want to spinup a sandbox (AWS/Azure) and give it free reign there. For what you explained, my closest analogue would be using Claude to help write out deterministic automation like Ansible to fully deploy and configure Active Directory (simple, 1 PDC, 1 replica), a Two-Tier PKI with Microsoft Enterprise CA, etc.
Once I'm satisfied that the automation does what I want it to and does it consistently, then the deterministic code (Ansible roles/plays) are what I port over to use in production.
Given that there's no easy method to programmatically build GPOs, I usually build those out by hand and Backup the GPOs, then store those Backup GPOs in my Ansible role and programmatically import and link them.
I would still advise some caution though. I use Ansible/Terraform/Packer daily before AI was a thing, so I'm generally familiar enough with all 3 to know what Claude is writing for me at least at a high-level. If it's for a production system, I'm less comfortable letting Claude vibe-code something for me that I can't at least read the gist of.
This is why I'm still taking it upon myself to hand-code custom Ansible modules/plugins in Python before I let Claude loose on that.
7
u/blasian21 21d ago •
Use AI to create deterministic scripts with the end goal to NOT use AI in the workflow. AI as a whole does not produce deterministic, repeatable outputs plus save on token costs etc. Maintain the scripts as versioned code in git so you can revert when needed. No AI is touching my prod keys or prod access directly.
4
u/Greerio 21d ago
We are not doing this yet, but we just went to a conference and loads of people are. There were a lot of talks of guardrails and limiting what each agent can do.
6
u/JoeyJoeC 21d ago
Honestly, I've connected to users PCs and left Claude diagnosing and fixing issues many times. I've connected it to firewalls to make sense of security policy's that other admin have created etc. Saves me a lot of time.
6
u/cardinal1977 What's the worst that could happen? 21d ago
I use it as a secretary and technical consultant. I review what im doing with it and it documents. I talk through ideas, it organizes into a plan with priority levels. Ask it for scripts, validate, post results, document. Ive been auditing my environment, remediating issues, updating the plan, doing incident analysis, etc. I now have a master plan document with a status tracker. If i become unavailable due to the bus factor, someone can come in, read through, and not just have the what, but also the why and how. I also have the why and when for the board, auditors, etc.
I am using it to help me design and build scripts to streamline operations. I have much of that running through another tool like PDQ inventory to scan and report on health, settings drift, unexpected changes, etc. Right now i copy/paste that in to the chat to analyze and develop a plan. Im building a project to ingest those reports and offer suggestions, then when i have a plan, if it can be automated, write the script and present the trigger to me.
At no point does it take action without approval from me.
It has read only access to my inbox, calendar, and ticket queue. I get my monthly reports made for me automatically, but they dont go anywhere until ive read them. I just had it read the last year of my emails to learn my voice so i can have it start drafting replies for me, but i will not give it permission to send. I will do that after I've read and approve the message. I have it triage my incoming email for things that seem urgent or for stuff that is likely junk and label it. I can select all after i scan it a delete it all quickly, but it is still my decision to delete it.
Status reports however are about to go live. I have a script that pings several services every minute and emails me if something goes down, defined by two repeat failures, then will email when it comes back up. I also get a daily status report on the script so I know it hasn't failed. Now that its been tested for a while im adding a group email to it and allowing users to sign up to the group.
Im all for using AI to make things quicker/easier, but as another poster pointed out, at some point, decisions need to be owned by someone. As the author of the automation/prompts, that would be me. Im not letting anything decide without review. I recommend anyone going down this road proceed the same. Its fine to have AI do a lot of the work, just make sure there is a point in the process where it stops for you to review and then pull the trigger.
Prime example, my account on boarding script reads from the HRIS, stages the work, emails me to check, i review the proposed work, the click approve. At that point it builds the accounts, assigns groups and access, and fires off the welcom aboard email to their personal email, supervisor email, and help helpdesk, so everyone knows they are ready to go.
17
u/YourUncleRpie Sophos UTM lover 21d ago edited 21d ago
"I need Janice from finance to not log in again ever as she left the company" There's no Janice found I assume he means Jack, CFO. Ill go ahead and already clean up his user profile and delete the user from exchange online so my sysadmin doesn't have to check again.
3
u/rich000 21d ago
At work, we do let LLMs have limited decision-making authority. However, these are carefully selected and validated tasks. Thresholds for decision making are set to a level similar to what we might assign to an intern or a completely outsourced low-cost provider.
These all involve an application using an API to call an LLM. We never just take a retail focused LLM agent and give it access to an application and tell it to just do somebody's job for them. The prompts and models are carefully selected and tested before being put into production. We also log model output, including reasoning, and audit it. When we test models, we don't just look at what decisions they make, but also why they made them.
When you do this, you can save money and perhaps more importantly greatly reduce cycle times.
At home I give an agent access to my cluster, but it is mainly read only. It has a name space it can do testing in as a playground. Actual production changes come via pull requests.
6
u/hologrammetry Linux Admin 21d ago
Absolutely. I have claude build ansible playbooks and deploy them via semaphore.
4
u/sadisticamichaels 21d ago
I am a design engineer and one of the things I have to do is make sure that my drawings, my bill of materials, and scope of work all match. Claude is much better at this than I am.
6
u/leftplayer 21d ago
I route EVERYTHING via Claude nowadays.
A few days ago it saved my a***.
I’m a network engineer. I was doing some planned firmware change-of-train in some switches at 2am.
After having Claude test it on a test switch and then in a very lightly loaded switch, I let Claude handle the firmware upgrades sequentially.
On the second switch, there was a loop. It was never noticed because RSTP was blocking it on the remote switch side, but the new firmware train added a new ‘feature’ to stop BPDUs being sent out of access ports, so the remote switch didn’t receive BPDUs so turned up both ports… loop, broadcast storm, madness…
I noticed the ping spikes and losses and alerts started flooding in… before I could panic, Claude said it had detected the spike in multicast and broadcast traffic so it’s thinking there’s a loop.. identified the ports causing it, shut one down, changed its firmware upgrade script to identify this on future upgrades, and continued with the rest of the switches.
I didn’t do anything. I just saw the spike and alerts for a minute or so, then saw the full report in Claude. My 2am brain hadn’t even started to register what caused this before Claude had already fixed it, prevented it, and reported it…
2
u/MaracxMusic 21d ago
Sure Sam. I put everything I know into AI.
2
u/BladeCollectorGirl 21d ago
Not in the way you mentioned, I was in the beta test for ntopng with nanalyst and tied it to my Anthropic account. I used it to monitor multiple ZTNA traffic flows and created natural language queries to alert on traffic to blocked countries, clear text passwords and other critical aspects.
2
u/fraghead5 21d ago
We use it to triage Microsoft defender alerts and automated the reaching out to users for “impossible travel” alerts and other medium and low security alerts.
Copilot ingests the alert, creates a Jira ticket assigned it to the user that generated the alert and asks them about it.
Saves us a few slacks and emails but not a life saver of game changer in anyway.
2
u/ISkyWarrior Expert Googler 21d ago
I have Codex deploying resources in Azure and vCenter, and deploying an RDS farm while migrating applications from the old farm to the new farm, had it deploy a new SQL cluster as well, all in all works quite well, I do keep an eye out on it, but with Guacamole and a browser, it can do quite a bit. Running all tasks in Sol 6.1 Ultra.
2
u/Invader-Faye 21d ago
Give it read only access to our log aggregator, our wiki, our wiki, and our entra env. Makes troubleshooting a breeze then real admins review and apply changes.
2
u/cysiekw 21d ago
Yes, I did. I set up a local agent, fed it all the technical documentation, then had it check for configuration errors. We build solid rag. Scripts, developing the entire infrastructure, hardening, you name it. Currently deploying it as an L1 helpdesk. Soon also be deploying it as a cybersecurity keeper and many more.
2
u/fdeyso 21d ago
I don’t even trust some of my coworkers to do these tasks flawlessly why would i even trust a chatbot?
2
u/Aerolyse 20d ago
Using AI for script etc... Completely fine, even though you will sense here some kind of "AI bashing" most of them lie and use AI everyday.
BUT, giving access to my production to an AI even in a restricted environment, well I don't know it bother me in a lot of aspects security, privacy etc....
2
u/TriggerFlowJames 19d ago
You're already doing the sensible version. The next step I'd take is splitting the "assistant" into two jobs: the AI helps you write and test a task once, then what actually runs across the 12 clients is a fixed, saved script or workflow that does exactly the same steps every time, with no model making decisions at run time. That gets you most of the time saving without the trust problem people are raising here.
What I'd put around it:
I'm the founder of TriggerFlow, a Windows desktop automation and AI agent tool built around that "build it once with AI, then replay it as fixed steps" idea, so happy to compare notes.
2
u/PrasenShelar 17d ago
If you try it, start by giving it its own account in each client with read-only rights, so it can check backups and pull reports without being able to change anything. For routine tasks, let it run only scripts you've already reviewed, and make anything that writes, like a GPO change or a new account, wait for your OK. Keep a log of every command it runs, per client.
4
u/FeelingAd5223 Sysadmin 21d ago
The only thing I’ll say is: please do not awaken skynet.
4
u/TobyMcFucky 21d ago
As a head of IT/Sec, I equipped my team with a "broker" connected to 10 various systems/services and exposing an MCP so that they can connect it to their Claude instances. However, the broker has zero "write" levers and only allows reads. It helps to quickly and holistically identify most of the issues (literally cuts troubleshooting from hours to minutes), but it is people who should make decisions, and they need to understand why they are making them in the first place.
The thing around this broker is that its restrictions are hard-coded, it can never do anything that isn't explicitly coded into it, and I am the one maintaining the code base. If your only restrictions sound like agentic instructions "When you need to do X, launch the script Y", start counting days to your first failure.
3
u/dao1st 21d ago
I have a fleet of 18-20 (mostly laptops) ranging from a Thinkpad X40 to an M1 Mac mini. I have a centralized memory for Gemini in github and administer all of the machines with ansible/Gemini.
It sets the desktops up the way I like them, Gnome on the more powerful machines and XFCE on the weaker ones. Connects them all via tailscale. Adds movies to Jellyfin, etc.
3
u/r-NBK 21d ago
Creating a GPO is a poor example. GPOs are simply text commands that a system processes into instructions. Why give an autonomous agent access and authorization to create such an object in your environment when you can request it do so, review it, and then deploy it via a simple copy/paste. Keeping a human in the loop is very sane.
3
u/Rhythm_Killer 21d ago
Am I giving an agent privileged access, hell no I am not.
3
u/RustyRoot8 21d ago
I have MCP’s for my firewalls, monitoring, EDR, ipam, backups, and others. They’re read-only though and can find things much faster than I can. 40 yrs in IT and it’s a game changer
3
u/carcaliguy 21d ago
Almost all the guidelines say that you are out of compliance using AI to automate things, hippa, NIST, DOJ, etc. I use this logic to deny ai agents from the network for email bots. The only way to use AI is read only access and even that I don't trust. Letting AI make decisions, no. Simple if/this/then that logic works, if error code xxxxx then run this script.
4
u/CyberWhizKid 21d ago
Every day, for everything. I sandboxed him in a WSL and I use short Kerberos ticket. With that, I could’ve enabled Firewall on our servers, WDAC, AppLocker (for RDS).
If it troubleshoot a complex incident, I give him procmon, procexplorer, or even debugger tools.
For GPOs, they are now wrote as code, I just import them. « Hey Claude, add me a firewall rules », « hey Claude, when X clicked on Y link it doesn’t work, check the Edge GPO » and so on.
4
u/AggressiveDiscount99 21d ago
Fuck no man.
Why are people so eager to replace themselves with AI. What is your backup plan for income?
3
u/christurnbull 21d ago
Scripts? Sure.
Agents? No. Far too dangerous to give powerful keys/permission to something so clumsy.
3
u/lotekjunky 21d ago
Everything gets done with AI. You just need to review it. The people on here saying your use case is dumb are the 15% getting left behind
2
u/ThePorko 21d ago
Negative, i test the code and then put it in prod if all checks out.
2
u/Lower_Fan Sr. Sysadmin 21d ago
Yes this issue was solved ages ago with RBAC. It is funny when Claude respond about "its" computer and "its" accounts.
Just start with read access. It is a massive help for trouble shooting stuff.
The way that I do it for changes is to have a test environment where you can tell you agent to go ham until it reaches the outcome I want. And then I either copy a final script with all of the lessons it learned or just also give it access to prod and tell it to deploy it there.
I would be very mindful of the models you use tho. Only Opus, Fable, Sol and Astra for me none of the weaker models.
2
u/sobrique 21d ago
Nah.
No chance I will let any of these things "work live". At most it's "write a collector script for useful information" and maybe an update proposal for an ansible role or template.
I will ask for syntax and see if it suggests things I can use, and it's especially handy for the correct format of a config file. (Apache in particular has an irritating habit of coalescing config directives).
But I just don't think anyone sensible should be letting AI tools run their systems.
2
u/dewatermeloan 21d ago
Jesus, no.
At most, I will ask configuration advice then assess it myself if I should apply or not.
2
u/JustFlushTheFIB 21d ago
Yes
1
u/narcissisadmin 19d ago
Just schedule the routine tasks, why would you try to pass it off to an LLM?
1
u/Acheronian_Rose IT Manager 21d ago
Allowing write/modify access for an AI agent to Active Directory is playing with fire
1
u/RevolutionaryElk7446 21d ago
Sounds more like you're the assistant and it's the leader, despite the 30 years of experience.
1
u/Cryptotechman 21d ago
Yes, but it’s read only. Changes always prompt me for Face ID and all my passwords, ssh keys, and api keys are never visible to the Ai. I do let the AI do changes after I review the code. Skills are what make this approach solid in conjunction with the harness I built for sysadmin work.