You are allowed to have inaccurate information in /etc/passwd. For instance, there is nothing to check that the information in the GECOS field [https://en.wikipedia.org/wiki/Gecos_field] is correct.
There is nothing to stop you deleting the created home directory afterwards, and nothing to force you to update the password file if you do delete it afterwards. I think you want the user to have an empty home directory field; that might be specified with: -h "" Maybe that is what you are asking for? Sam On 14 December 2016 at 20:59, David Henderson <dhender...@digital-pipe.com> wrote: > Hey Tito, thanks again for the reply. I'm not sure how that example > is disproving my concerns. :) It is still reflecting inaccurate > information in /etc/passwd. > > Dave > > > On 12/14/16, Tito <farmat...@tiscali.it> wrote: > > > > > > On 12/14/2016 03:26 PM, David Henderson wrote: > >> Thanks for the reply Tito! No problem about the initial response - it > >> happens. :) To me it would seem little odd to state something in one > >> place, but not have it in reality. Would there be a reason to have > >> this mismatch of information? It has an appearance of just being > >> messy and providing misinformation. > >> > >> Thanks, > >> Dave > > > > Hi, > > take as example this line from /etc/passwd > > > > nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin > > > > this is an user that you would create with using -H: > > > > adduser -u 65534 -G nobody -h /nonexistant -H -D -s /usr/sbin/nologin > > > > Ciao, > > Tito > > > >> > >> On 12/14/16, Tito <farmat...@tiscali.it> wrote: > >>> > >>> > >>> On 12/14/2016 07:59 AM, Tito wrote: > >>>> On 12/13/2016 04:46 PM, David Henderson wrote: > >>>>> Good morning gang! Working with the 'adduser' applet and noticed > that > >>>>> when specifying the '-H' parameter the /etc/passwd file still gets a > >>>>> home directory value (which doesn't exist in the file system). Is > >>>>> this an error? If no home directory was to be made, shouldn't that > >>>>> value be blank? > >>>>> > >>>>> Thanks, > >>>>> Dave > >>>> > >>>> Hi, > >>>> from man adduser on debian: > >>>> "adduser will create a home directory subject to DHOME, GROUPHOMES, > and > >>>> LETTERHOMES. The home directory can be overridden from the command > >>>> line > >>>> with the --home option" > >>>> In fact we don't support DHOME, GROUPHOMES, and LETTERHOMES but > >>>> use only the user name to create the home directory unless > >>>> the name is specified on the command line with the -H option. > >>>> > >>>> /* create string for $HOME if not specified already */ > >>>> pw.pw_dir = xasprintf("/home/%s", argv[0]); > >>>> > >>>> We don't support --no-create-home option at the moment > >>>> but i think it would be easy to add. > >>>> > >>>> Ciao, > >>>> Tito > >>> > >>> Sorry, I misunderstood your question and was in a rush. > >>> So let's try to be more accurate this time. > >>> In reality we support the -H option as you correctly > >>> stated: > >>> > >>> -H same as --no-create-home > >>> -h alternative name for home dir rather than user's name > >>> > >>> but -H --no-create-home refers only to the creation of the > >>> home dir (the mkdir) not to having it in /etc/passwd: > >>> > >>> "Do not create the home directory, even if it doesn't exist" > >>> > >>> so i think busybox is doing it correctly. > >>> > >>> Sorry for the previous noise. > >>> > >>> Ciao, > >>> Tito > >>> > >>> _______________________________________________ > >>> busybox mailing list > >>> busybox@busybox.net > >>> http://lists.busybox.net/mailman/listinfo/busybox > >>> > >> > > _______________________________________________ > > busybox mailing list > > busybox@busybox.net > > http://lists.busybox.net/mailman/listinfo/busybox > > > _______________________________________________ > busybox mailing list > busybox@busybox.net > http://lists.busybox.net/mailman/listinfo/busybox >
_______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox