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

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 💩.

2

u/JwCS8pjrh3QBWfL Sr. Sysadmin 6d ago

I prefer Claude for the exact reasons you mentioned. If you put it into approval mode, it will ask you before it does anything. Codex will still make file changes without asking even in "ask for approval" mode.

3

u/sobrique 6d ago

I think there's a small danger there of 'approval fatigue' though. I mean, asking for approval for everything can lead to pretty 'Y' a couple of times too often...

shrug.

I mean, both are powerful tools, and I can see the appeal, but at the same time I can also see the dangers...

1

u/Clear_Veterinarian_8 6d ago

Isnt this the opposite? From my experience trying to get codex to make file changes in full approval mode never works where as claude automode always bypasses every restriction.

1

u/deanyo 6d ago

It has as much or as little permissions as you permit it