change-user-run 0.1.1

Run commands as other users and create users
Documentation
# Change-user-run 🔄🖥️🏃‍➡️

A simple [Rust] library to aide with the creation of users and running commands as users on Linux systems.

If you have ever had the need to conveniently run commands as other users (e.g. in containerized tests), or to create new users on a Linux system, this is for you!

## Documentation

Refer to <https://docs.rs/change_user_run/latest/change_user_run/> for released versions of the crate.

## Examples

Create a set of users

```rust no_run
use change_user_run::create_users;

# fn main() -> testresult::TestResult {
// Create a single user in the default location with the default shell.
create_users(&["testuser1", "testuser2"], None, None)?;
# Ok(())
# }
```

Run a command using a separate user

```rust no_run
use change_user_run::run_command_as_user;

# fn main() -> testresult::TestResult {
// Run `whoami` as the user `testuser1`.
run_command_as_user("whoami", &[], None, &[], None, "testuser1");
# Ok(())
# }
```

## Contributing

Please refer to the [contributing guidelines] to learn how to contribute to this project.

## Releases

Releases are created by the developers of this project.

[OpenPGP certificates] with the following [OpenPGP fingerprints] can be used to verify signed tags:

- [`991F6E3F0765CF6295888586139B09DA5BF0D338`] [David Runge] &lt;<dvzrv@archlinux.org>&gt;
- [`653909A2F0E37C106F5FAF546C8857E0D8E8F074`] [Wiktor Kwapisiewicz] &lt;<wiktor@archlinux.org>&gt;

Some of the above are part of [archlinux-keyring] and certified by at least three [main signing keys] of the distribution.
All certificate are cross-signed and can be retrieved from [OpenPGP keyservers].

## License

This project can be used under the terms of the [Apache-2.0] or [MIT].
Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.

[Apache-2.0]: LICENSES/Apache-2.0.txt
[David Runge]: https://archlinux.org/people/developers/#dvzrv
[MIT]: LICENSES/MIT.txt
[OpenPGP keyservers]: https://wiki.archlinux.org/title/OpenPGP#Keyserver
[Rust]: https://www.rust-lang.org/
[Wiktor Kwapisiewicz]: https://archlinux.org/people/support-staff/#wiktor
[`653909A2F0E37C106F5FAF546C8857E0D8E8F074`]: https://pgpkeys.eu/pks/lookup?search=653909A2F0E37C106F5FAF546C8857E0D8E8F074&fingerprint=on&op=index
[`991F6E3F0765CF6295888586139B09DA5BF0D338`]: https://pgpkeys.eu/pks/lookup?search=991F6E3F0765CF6295888586139B09DA5BF0D338&fingerprint=on&op=index
[archlinux-keyring]: https://gitlab.archlinux.org/archlinux/archlinux-keyring
[contributing guidelines]: CONTRIBUTING.md
[main signing keys]: https://archlinux.org/master-keys/