sg tips — authorized alternate-group shell literacy
sg helps authorized labs sample alternate-group shell literacy on hosts they own. Pair with newgrp-tips, groups-tips, gpasswd-tips, groupmems-tips, getent-tips. Prefer lab VMs — never escalate group context on foreign hosts without permission.
Snapshot
| Field | Value |
|---|---|
| Surface | sg tip checklist |
| Job | Authorized alternate-group shell literacy |
| Switch peer | newgrp-tips |
| Membership peer | groups-tips |
| Admin peer | gpasswd-tips |
| Members peer | groupmems-tips |
Tip checklist (authorized only)
- Confirm you may run
sgon the lab host (syllabus box you own or were given access to). - Prefer documenting who / why / ticket before any group-context switch — never use production privileged groups without change control.
- Record short factual notes; quote short Evidence (target group name, whether
-cran a one-shot command — never group passwords). - Optional: interactive primary-group switch → newgrp-tips.
- Optional: membership listing → groups-tips.
- Prefer disposable lab groups for sg drills; quote
id/groupsafterward as Evidence. - Prefer
sg group -c 'command'for one-shot lab Evidence over lingering interactive shells when the syllabus allows. - Stop at literacy — no attack or unauthorized group-escalation cookbooks.
Allowed framing
- Classroom labs reviewing
sg/sg group -c '…'on authorized disposable groups. - Binding short factual notes as Evidence (group name / command label — no secrets).
- Documenting expected vs observed effective GID for authorized inventory notes.
- Comparing sg ↔ newgrp / groups / gpasswd peer tip pages under one binder.
- Testing group-password prompts only when the syllabus authorizes that drill on lab groups.
Scope we will not cover
- No crack/pirate/keygen via sg.
- No intentional unauthorized privileged-group shell access against foreign hosts.
- No secret-theft or group-password harvesting against hosts you do not own.
- No cookbooks that abuse sg as persistence or privilege escalation without authorization.
Beginner path (authorized only)
- Obtain one syllabus-approved disposable lab host with shadow-utils / util-linux tools installed.
- Ensure a throwaway group membership via groupadd-tips / gpasswd-tips before any sg drill.
- With authorization, run
sg labgroup -c 'id'(or interactivesg labgroup); quote non-secret GID/name Evidence. - Optional: primary-group peer with newgrp-tips; membership literacy with groups-tips.
- Stop at literacy — no attack or unauthorized group-shell cookbooks.
Practical notes for authorized labs
sgruns a command (or shell) with an alternate group — keep Evidence labels distinct from newgrp-tips.- Group passwords (when set) are secrets — quote whether a prompt appeared; never paste the password.
- Pair with getent-tips for before/after NSS Evidence.
- Prefer documenting the exact group name the syllabus authorized — avoid guessing production groups.
- Never commit group-password material or membership dumps to git — even for labs.
- Label lab-only shells clearly so they are not mistaken for production posture.
FAQ-aligned refusals (quick)
- Foreign-host group-shell drills → refuse.
- Unauthorized privileged-group escalation cookbooks → refuse.
- Attack/credential-theft framing → refuse.
- Prefer authorized, redacted, secret-free Evidence.
- Use newgrp / groups / gpasswd peer tip pages when the syllabus asks.
- No crack or unauthorized-access framing.
For legal, authorized and educational use only.
FAQ
What is a "sg tip" page in BinBench framing?
A checklist for authorized alternate-group command/shell Evidence (sg group -c '…' or interactive) on hosts you own or were given syllabus access to — not a cookbook for escalating group context on foreign servers.
How does this relate to newgrp-tips / groups-tips / gpasswd-tips?
newgrp-tips covers primary-group switch shells; groups-tips covers membership listing; gpasswd-tips covers group password/admin membership. This page zooms on a general sg tip checklist — it does not overwrite those pages.
Can I run sg against hosts I do not own?
No. Authorization first. BinBench will not publish unauthorized alternate-group shell drills against foreign hosts.
Does this teach attack PoCs via sg?
No. Mentions of attack/bypass appear only as refusals. Authorized literacy only — prefer lab VMs and redacted samples.
Does this teach secret theft via sg?
No. Never paste group passwords, membership dumps with credentials, or foreign host group files into notes. Prefer documenting intended group name and non-secret command labels only.