On Wed, May 14, 2014 at 1:38 PM, Tito <[email protected]> wrote: > On Wednesday 14 May 2014 12:33:45 you wrote: >> On Tue, May 13, 2014 at 8:27 PM, Tito <[email protected]> wrote: >> > On Tuesday 13 May 2014 19:01:41 Laszlo Papp wrote: >> >> Hi, >> >> >> >> is this possible? I am looking for something like "usermod -l" on desktop. >> > >> > This is actually not supported by busybox. >> > So far we are able to add and delete users or groups >> > or add users to groups or delete users from groups. >> >> Is that by design or no one has stepped up yet doing the work? > > I suppose nobody needed that feature so far.
OK, let us say I need this feature: * Is it acceptable to add it to busybox (at least with some configuration)? * Where would it fit, adduser, separate applet or somewhere else? >> >> Alternatively, I have to look into the get/setpwent syscalls? >> > >> > Yes. You can take a look at libbb/update_passwd.c for inspiration >> > and you need to be root to perform the user name change. >> >> It does not seem to use setpwent/getpwent though. It seems to be >> fiddling with manual file opening and so on. Why is it like that? > > I think editing on a per line basis is easier in that you can simply > write the untouched lines to the new file and edit the field > of the line of interest without touching other fields. Fair enough, albeit there could have been a serialization posix method out of the passwd structure creating the string for convenience... _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
