Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-19-2008, 09:52 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
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.

Gopal Sukumar.
Old 06-19-2008, 10:42 AM   #2
Senior Member
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
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.
Old 06-19-2008, 10:43 AM   #3
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Old 11-25-2009, 01:29 AM   #4
LQ Newbie
Registered: Nov 2009
Distribution: archlinux
Posts: 6

Rep: Reputation: 0
bsdunix is right.
they are in shadow package suite.
you can download the source code from official website

ls shadow-4.1.4/src
Code:  chpasswd.c  groupadd.c   grpck.c	   login.c	  nologin.c   su.c	 usermod.c  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
Old 11-25-2009, 10:01 AM   #5
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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:



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling password expiration via useradd or usermod (or something else)? eviser Linux - Software 2 05-31-2006 02:53 PM
Useradd - Cannot locate /etc/default/useradd in Solaris Paean Solaris / OpenSolaris 4 12-09-2005 02:36 AM
usermod and useradd problem kenji Linux - Newbie 4 02-23-2005 12:10 PM
usermod / useradd ? bibilit Linux - Software 1 12-19-2003 03:16 AM
/etc/shadow and useradd -p usermod -p granny Linux - Security 3 08-29-2003 01:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration