https://github.com/sr229/wslinit
Helper Script to allow non-DistroLauncher distros to initialize a new user.
https://github.com/sr229/wslinit
Last synced: 4 months ago
JSON representation
Helper Script to allow non-DistroLauncher distros to initialize a new user.
- Host: GitHub
- URL: https://github.com/sr229/wslinit
- Owner: sr229
- License: mit
- Created: 2020-08-09T17:26:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T15:37:10.000Z (about 4 years ago)
- Last Synced: 2025-01-01T10:44:06.583Z (6 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# First-time user init script for WSL2 distros
Based on how DistroLauncher-based distros does their thing, you can now painlessly add a first time user without using DistroLauncher for that purpose.
## How does it work?
DistroLauncher-based distros always execute on the following sequence:
- Ask you for your first time username and password
- If already initiated, just run using that user.However, we don't have that liberty if we use standard `wsl --import`, so here's a little sample!
## Using
First of all, put the shell script in the appropriate place, somewhere in `/usr/bin/` or similar, then simply add it on `$HOME/.bashrc` on the `root` user.
You will have to figure out how to prevent re-executing the script yourself. A good way to do this is to comment out the line where this script is getting initialized after the successful invocation of this script first time.
A sample version of this would be [`firstrun.sh`](https://github.com/sr229/wslinit/blob/master/firstrun.sh) located in this repository.
## Copyright
Copyright 2020 © Ayane Satomi. Licensed under MIT.