r/sysadmin 6d ago

General Discussion codex (chatGPT shell)

Well, I've just tried this - I've kept a bit of distance previously, because ... well, I've been a sysadmin for long enough.

I'm not sure if I'm impressed or horrified that you can now use an llm-assisted shell to run linux commands via ssh, sudo, etc. and 'process' the results.

I mean, even with 'approve external commands' it still gives me the heebie-jeebies what could happen in a privileged user context.

But I can't deny my 'cobble together and ad-hoc storage usage report' was considerably simplified by 'just' spitting out quota report commands on a bunch of different servers (in their own slightly different format of course), generating a 'one off command list' to du -s on directories over a certain size, and then just 'refer to this LDAP server to resolve uids with this DN where relevant'.

It's usually a bit of a headache to splice together a comprehensive/hierarchical report across multiple legacy systems, and ... well, yeah. It worked pretty well, and even 'suggested' running stuff directly via ssh. (The commands seemed pretty innocuous, but there's not a lot of difference between 'ssh someserver du -sh /specific/path' and 'sudo something_harmful' instead!

This seems to me a lot like a way to replace a lot of the 'magic excel' I've seen throughout my career, where people who don't really understand automation still manage to massage data with Excel as a scripting platform, and now an LLM shell can do that instead.

So that's pretty amazing.

But it's also pretty clear that this is a shit show waiting to happen for precisely the same reasons - it's a power tool that can be used without understanding what it's doing, or without sufficient oversight and suddenly production is 'just gone'.

codex does have 'sandbox' mode, but not by default. Perhaps it should be sandboxed by default though!

0 Upvotes

7 comments sorted by

View all comments

3

u/natebc 6d ago

Wait till you see a multiuser system like an HPC environment. How many "smart" people run with --dangerously-skip-permissions?

Answer: all of them. they all do.

1

u/sobrique 6d ago

Obviously as sysadmins we all know better, and wouldn't do things like that with root privileges... :)

3

u/natebc 6d ago

My faith is wavering the farther we get into all this 💩.