Hey guys,
Please see here for more information http://forums.freebsd.org/showthread.php?t=24346. That thread will explain why I am trying to add a user to a modified boot-only ISO and mfsroot.gz. In short, I would like to add in DHCP support but I am facing an issue.
When I execute dhclient I am prompted with
Ok, not a problem, lets go ahead and add them:
Now, most of my research said that "bad file descriptor" is usually an error because the drive has errors but the issue here is that I am already on a read/write file system from /dev/md0. I can edit /etc/passwd directly and if I chroot into the installed environment in /mnt that my auto-install process does, I am able to successfully run dhclient.
My main issue here is that I am trying to run dhclient prior to extracting the base system to /mnt but can not because the user does not exist. When I try to create the user the pw bin gives me an error about bad file descriptor when in reality, I can update /etc/passwd directly. Is there somewhere else dhclient may look for user information before dying out?
EDIT:
I see that dhclient fails here
Looks like getpwnam looks up a number of files of which are encrypted and I can't force the user into the database.
Any suggestions?
Please see here for more information http://forums.freebsd.org/showthread.php?t=24346. That thread will explain why I am trying to add a user to a modified boot-only ISO and mfsroot.gz. In short, I would like to add in DHCP support but I am facing an issue.
When I execute dhclient I am prompted with
Code:
no such user: _dhcp, falling back to "nobody"
no such user: nobody
exiting
Ok, not a problem, lets go ahead and add them:
Code:
$ pw user add [ ... ]
pw: passwd file update: bad file descriptor
Now, most of my research said that "bad file descriptor" is usually an error because the drive has errors but the issue here is that I am already on a read/write file system from /dev/md0. I can edit /etc/passwd directly and if I chroot into the installed environment in /mnt that my auto-install process does, I am able to successfully run dhclient.
My main issue here is that I am trying to run dhclient prior to extracting the base system to /mnt but can not because the user does not exist. When I try to create the user the pw bin gives me an error about bad file descriptor when in reality, I can update /etc/passwd directly. Is there somewhere else dhclient may look for user information before dying out?
EDIT:
I see that dhclient fails here
Code:
if ((pw = getpwnam("_dhcp")) == NULL) {
warning("no such user: _dhcp, falling back to \"nobody\"");
if ((pw = getpwnam("nobody")) == NULL)
error("no such user: nobody");
}
Looks like getpwnam looks up a number of files of which are encrypted and I can't force the user into the database.
Any suggestions?