-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration option for specifying the username #1015
Comments
+1 one for this, my mac username is Note I can't seem to find any logs for the warning either. |
👍 |
What is the use case for this? Why would you use a different username than the one on the host? Is the problem that the user already exists inside the OS image you are using?
This would not work with the proposed mechanism; the alternate username would still be subject to the same validation. The rule exist because many user names from macOS don't work with Linux commands: $ limactl shell alpine sudo -i
lima-alpine:~# useradd me@example.com
useradd: invalid user name 'me@example.com': use --badname to ignore
lima-alpine:~# useradd firstname.lastname
lima-alpine:~# chown firstname.lastname $HOME
chown: unknown user/group firstname:lastname As you can see, email addresses don't work with I've personally spent multiple days helping users with these issues (and learning about all the wild things organizations use for user names). Yes, at least one person uses Since I don't want to waste any more time of my life debugging these issues, I've added the validation found in upstream tools. The easiest way to have the same user name inside the VM is to use a simple name for your account on the host (you still have a fullname field for the proper name). |
@jandubois we found out that using username "docker" creates some issues, but there is no way to override the username. |
I have a Vagrant-like use case which could really benefit from a config option for setting the user. In the Vagrant case, it's always The original proposal here was for |
I use lima to have ... linux in mac. My username in mac is Otherwise when I do It's quite important for me to have my own username, not default |
Description
lima creates a default user as specified in https://github.com/lima-vm/lima/blob/master/pkg/cidata/cidata.TEMPLATE.d/user-data#L18, where the username is https://github.com/lima-vm/lima/blob/master/pkg/osutil/user.go#L102. In some cases the username and groups can't be created (example: username
docker
). While these errors could be handled better, it would be useful to support specifying the username of the created user with e.g. environmental variables.I propose that env variable
LIMA_DEFAULT_USERNAME
would be used instead of the current user's username for the default user.The text was updated successfully, but these errors were encountered: