Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#32893 - [shadow] adduser script does not respect SHELL in /etc/defaults/useradd

Attached to Project: Arch Linux
Opened by Josh (codekoala) - Wednesday, 28 November 2012, 19:57 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 13 January 2013, 21:00 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Apologies if this should be categorized as a FR. It feels like a bug to me given the contents of the shadow package at including both useradd.defaults and the adduser script.

Customizing the SHELL variable in /etc/default/useradd has no effect on the adduser script in Arch's shadow package. The default shell for the adduser script is hardcoded on line 91: It should be easy enough to source the /etc/default/useradd script and set defshell=$SHELL or at least to grep the default SHELL out of /etc/default/useradd.

Additional info:
* package version(s) shadow

Steps to reproduce:
* Set the default shell for useradd: useradd -Ds /bin/zsh
* Verify the shell has changed: useradd -D
* Execute the adduser script and note that the default shell remains /bin/bash
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 13 January 2013, 21:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  removed adduser in testing/shadow-
Comment by Dave Reisner (falconindy) - Wednesday, 28 November 2012, 21:10 GMT
Solution: don't use adduser? I think I'd rather just stop shipping this script. This isn't the only bug/feature it has.
Comment by Greg (dolby) - Wednesday, 28 November 2012, 22:53 GMT
+1 on dropping this. This is a Slackware script with the difference that Slackware actually maintains this.
Arch's is the same from 2004.
Comment by Josh (codekoala) - Wednesday, 28 November 2012, 23:18 GMT
That's certainly a solution. If there's only one "official" way to handle the creation of new users, there'd be less room for problems like this to arise. Being a former Slacker, I do think I would feel a big deprived at first, but I can learn to deal with it ;)

EDIT: For those who come here looking for adduser, I've created two packages in the AUR for it. One is the original script from Slackware and the other is one patched to handle the bug reported here: