LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Source Code for useradd, usermod etc. (https://www.linuxquestions.org/questions/linux-newbie-8/source-code-for-useradd-usermod-etc-650323/)

gopal.sukumar 06-19-2008 08:52 AM

Source Code for useradd, usermod etc.
 
Hi all,

Please let me know where we can find the source code for useradd and usermod shell commands.

Thanks,
Gopal Sukumar.

bsdunix 06-19-2008 09:42 AM

If memory serves me correct, the source code for those are located in the shadow suite source, at least that's where Slackware has them. Your distro should have source code available either with the installer disc or from the their website.

unSpawn 06-19-2008 09:43 AM

Searched GNU.org?

ywzhaifei 11-25-2009 12:29 AM

bsdunix is right.
they are in shadow package suite.
you can download the source code from official website
http://pkg-shadow.alioth.debian.org/

ls shadow-4.1.4/src
Code:

Makefile.am  chpasswd.c  groupadd.c  grpck.c          login.c          nologin.c  su.c        usermod.c
Makefile.in  chsh.c        groupdel.c  grpconv.c    login_nopam.c  passwd.c    suauth.c        vipw.c
chage.c      expiry.c        groupmems.c  grpunconv.c  logoutd.c          pwck.c      sulogin.c
chfn.c            faillog.c        groupmod.c  id.c          newgrp.c          pwconv.c    useradd.c
chgpasswd.c  gpasswd.c        groups.c    lastlog.c    newusers.c          pwunconv.c  userdel.c


lazlow 11-25-2009 09:01 AM

To a certain extent this will be distro specific, so I would get it directly from your distro. For instance on Centos 5.4 it is:

Quote:

shadow-utils-4.0.17-14.el5.src.rpm


All times are GMT -5. The time now is 02:31 PM.