Skip to content

Commit

Permalink
Update user crud doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bahamat committed Apr 21, 2024
1 parent cfab9f6 commit 401ec4e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/allowing-user-crud-in-the-global-zone.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# Allowing user CRUD in the global zone

Note: This does not seem to work properly anymore.

## Introduction

This script manifest and method extend the lofs mounts that are included
in Joyent's svc:/system/filesystem/smartdc SMF service
in SmartOS's svc:/system/filesystem/smartdc SMF service
(`/lib/svc/manifest/system/filesystem/joyent-fs.xml`) to include
`/etc/passwd` and `/etc/group`, along with logic to keep the analogs in
`/usbkey/` in sync with the active system variants in `/etc/`.
`/etc/passwd` and `/etc/group`. Note that because these become lofs mounts,
tools like `useradd` will not work.

Place both files in `/opt/custom/smf`, and when you would like to
add/modify/delete system users in the global zone, run `svcadm
disable mount_usbkey_userfiles` and make your changes. When you are
finished, run `svcadm enable mount_usbkey_userfiles` to bring the
system back into 'normal' working mode.

### User/Group Management tasks

Because the necessary files are lofs mounted, tools like `useradd` will not
work. Instead, modify the files in their source location (`/usbkey/passwd`,
`/usbkey/group`, `/usbkey/shadow`) and then restart the
`mount_usbkey_userfiles` service.

### Manifest

`mount_usbkey_userfiles.xml`
Expand Down Expand Up @@ -50,7 +55,7 @@ system back into 'normal' working mode.

### Method

`mount\_usbkey\_userfiles` (must be executable)
`mount_usbkey_userfiles` (must be executable)

#!/usr/bin/bash

Expand Down

0 comments on commit 401ec4e

Please sign in to comment.