Skip to content

usermod, newusers, prefix: enforce absolute paths for homedir#352

Merged
hallyn merged 1 commit into
shadow-maint:masterfrom
hallyn:2021-06-01/relpath
Jun 4, 2021
Merged

usermod, newusers, prefix: enforce absolute paths for homedir#352
hallyn merged 1 commit into
shadow-maint:masterfrom
hallyn:2021-06-01/relpath

Conversation

@hallyn
Copy link
Copy Markdown
Member

@hallyn hallyn commented Jun 2, 2021

useradd already was enforcing this, but these were not.

Signed-off-by: Serge Hallyn serge@hallyn.com

useradd already was enforcing this, but these were not.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
@hallyn hallyn merged commit a6154b8 into shadow-maint:master Jun 4, 2021
@votdev
Copy link
Copy Markdown
Contributor

votdev commented Nov 23, 2024

With this change it is not possible anymore to unset the user home directory. What is the suggested workaround or is this a regression?

@hallyn
Copy link
Copy Markdown
Member Author

hallyn commented Nov 25, 2024

With this change it is not possible anymore to unset the user home directory. What is the suggested workaround or is this a regression?

So if user w3m has homedir /home/w3m you want to usermod -d "" ? I guess the suggested workaround would be to just use a nonexistent path, but yes this is a regression. Would you mind opening an issue for it (assigned to me), or if you prefer posting a patch to fix it (by just adding a check for it being the empty string and allowing that).

votdev added a commit to votdev/shadow that referenced this pull request Nov 26, 2024
Related to: shadow-maint#352

Signed-off-by: Volker Theile <votdev@gmx.de>
votdev added a commit to votdev/shadow that referenced this pull request Nov 26, 2024
With the PR 352 it is not possible anymore to run `usermod --home "" <USERNAME>`. This PR will fix that regression.

Related to: shadow-maint#352

Signed-off-by: Volker Theile <votdev@gmx.de>
@votdev
Copy link
Copy Markdown
Contributor

votdev commented Nov 26, 2024

With this change it is not possible anymore to unset the user home directory. What is the suggested workaround or is this a regression?

So if user w3m has homedir /home/w3m you want to usermod -d "" ? I guess the suggested workaround would be to just use a nonexistent path, but yes this is a regression. Would you mind opening an issue for it (assigned to me), or if you prefer posting a patch to fix it (by just adding a check for it being the empty string and allowing that).

If opened the PR #1133.

votdev added a commit to votdev/shadow that referenced this pull request Nov 26, 2024
With the PR 352 it is not possible anymore to run `usermod --home "" <USERNAME>`. This PR will fix that regression.

Related to: shadow-maint#352

Signed-off-by: Volker Theile <votdev@gmx.de>
votdev added a commit to votdev/shadow that referenced this pull request Nov 27, 2024
With the PR 352 it is not possible anymore to run `usermod --home "" <USERNAME>`. This PR will fix that regression.

Related to: shadow-maint#352

Signed-off-by: Volker Theile <votdev@gmx.de>
hallyn pushed a commit that referenced this pull request Nov 27, 2024
With the PR 352 it is not possible anymore to run `usermod --home "" <USERNAME>`. This PR will fix that regression.

Related to: #352

Signed-off-by: Volker Theile <votdev@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants