Skip to content

fix: redact HPC username and remove hardcoded home paths#79

Closed
stanfish06 wants to merge 2 commits into
masterfrom
claude/nice-cori-GGan8
Closed

fix: redact HPC username and remove hardcoded home paths#79
stanfish06 wants to merge 2 commits into
masterfrom
claude/nice-cori-GGan8

Conversation

@stanfish06
Copy link
Copy Markdown
Owner

Closes #77
Closes #78

Changes

1. hpc/monitor_job.sh — use $USER instead of zyyu (info leak)

-  for jobid in $(squeue -u zyyu -h -o "%i"); do
+  for jobid in $(squeue -u "$USER" -h -o "%i"); do

zyyu was a hardcoded HPC username missed when PR #39/PR #50 cleaned ssh/config and hpc/ssh/config. Using $USER makes the script work for any account.

2. wezterm/.wezterm.lua — redact zyyu username (info leak)

-	username = "zyyu",
+	username = "username",
...
-		args = { "ssh", "zyyu@greatlakes.arc-ts.umich.edu" },
+		args = { "ssh", "username@greatlakes.arc-ts.umich.edu" },

Same redaction pattern as ssh/config (PR #50).

3. sway/40-sway-background.conf — stable wallpaper path (compatibility)

-output * bg /home/stanfish/Git/my-configs/img/space.jpeg fill
+output * bg ~/.config/sway/wallpaper.jpeg fill

Same pattern as PR #47 for i3. Wire up at deploy time:

ln -sf ~/Git/my-configs/img/space.jpeg ~/.config/sway/wallpaper.jpeg

4. linux/services/email.service — use %h specifier (compatibility)

-User=stanfish
-ExecStart=/home/stanfish/scripts/system/fetch-emails.sh
+# User=  # set locally: User=your-username
+ExecStart=%h/scripts/system/fetch-emails.sh

%h is the systemd home-directory specifier for the configured User=.

Test plan

  • grep -r 'zyyu\|zyu14' hpc/monitor_job.sh wezterm/ — no matches
  • grep -r 'home/stanfish' sway/ linux/services/ — no matches
  • monitor_job.sh on HPC lists current user's jobs
  • Sway starts with wallpaper after symlinking ~/.config/sway/wallpaper.jpeg

https://claude.ai/code/session_01WgPdS4Zw5VcKhxYsuvCWXq


Generated by Claude Code

claude added 2 commits May 22, 2026 13:09
- hpc/monitor_job.sh: replace hardcoded `zyyu` with `$USER` in squeue call
- wezterm/.wezterm.lua: replace `zyyu` username placeholder in ssh_domains
  and launch_menu SSH entry (same redaction pattern as ssh/config PR #50)

https://claude.ai/code/session_01WgPdS4Zw5VcKhxYsuvCWXq
…me dir

- sway/40-sway-background.conf: replace /home/stanfish/Git/my-configs/img/space.jpeg
  with ~/.config/sway/wallpaper.jpeg (same stable-path pattern as PR #47 for i3).
  Wire up once at deploy time:
    ln -sf ~/Git/my-configs/img/space.jpeg ~/.config/sway/wallpaper.jpeg

- linux/services/email.service: replace hardcoded User=stanfish and
  /home/stanfish/ path with %h specifier (systemd expands %h to the home
  directory of the configured User). Add placeholder comment for User=.

https://claude.ai/code/session_01WgPdS4Zw5VcKhxYsuvCWXq
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b629382d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread wezterm/.wezterm.lua
name = "greatlakes",
remote_address = "greatlakes.arc-ts.umich.edu",
username = "zyyu",
username = "username",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve remote username dynamically for Great Lakes SSH

Replacing the real account with the literal string "username" makes both connection paths attempt to authenticate as a non-existent user unless someone manually edits the file, so the built-in Great Lakes entries stop working out of the box. To keep this portable without breaking connectivity, this should derive the username from environment/SSH config or omit it rather than hardcoding a placeholder account name.

Useful? React with 👍 / 👎.

Comment on lines +11 to +12
# User= # set locally: User=your-username
ExecStart=%h/scripts/system/fetch-emails.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve explicit service user in email unit

Commenting out User= changes this from an unprivileged user service to running as root in the system manager, which also changes %h to root’s home and makes ExecStart resolve under /root rather than the intended account. On hosts where the script is in a normal user home, this will fail to start and also broadens privileges unexpectedly.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: hardcoded /home/stanfish/ paths in sway background and email.service fix: HPC username zyyu still hardcoded in monitor_job.sh and wezterm config

2 participants