Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running SLED 11, and I want to understand what the useradd command does and how it does what it does. I know that SLED 11 is built from OpenSuSE 11.1 and I would be more than satisfied with the OpenSuSE 11.1 source code for useradd.

Where can I find the source code for useradd?

share|improve this question
up vote 2 down vote accepted

On openSUSE useradd is from package pwdutils. Homepage, source

share|improve this answer

since SUSE is an rpm based distro, you should be able get it by:

$ rpm -qf `which useradd`

which will tell you which package it is in. You can then go get that package source from the repository, which in my case is here: (I run fedora; your package repository location will be different)

share|improve this answer

Don't know about SLED, but the Debian version is available here.

share|improve this answer

The useradd utility might well be a script.


$ file $(which useradd)


file `which useradd`

if your shell doesn't support $() style command expansion).

If it is a script, use more or an editor...

share|improve this answer
file $(which useradd) returns: /usr/sbin/useradd: ELF 32-bit LSB executable, Intel 80386. version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), stripped – eleven81 Oct 26 '09 at 17:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.