Tag Info

New answers tagged

0

Under Debian 8, useradd is under passwd. I have version 4.2-3 installed. useradd(8) man page provides each option and how it is set on the command line and where if any place it is set in a configuration file, typically this in /etc/default/useradd. USERGROUPS_ENAB for example is specified in /etc/login.defs, not /etc/default/useradd. Defaults are given in ...


0

taken from this script https://gist.github.com/Fluidbyte/6321547 There's a great language called expect that interacts with programs. Here's what you're looking for. You can always modify this to pull username and password from an external source. #!/usr/bin/expect set user "username" set password "password" send "useradd -m $user\r" # Expect prompt ...


1

What you want is a custom pam solution. Pluggable Authentication Modules are capable of doing things like this with minimal difficulty. The challenge is to manage the users. The two ways to accomplish this depends on where you are keeping your main user database. If you are using LDAP, the ldap modules have options to restrict users based on various ...


-1

Most likely your server is a NIS client and hence adding local users maybe forbidden. Just check if this is a part of NIS domain.


5

useradd only uses the same UID and GID when either: It won't cause a conflict; or You force it with the -u and -g flags It will skip over already-in-use IDs. So, I would guess that you have added other users and/or groups since you created those that have matching UID/GID pairs.ยน To get the IDs back in lock-step, you could create the next one with -g ...


4

adduser is there for compatibility with older versions of RHEL, and with other OSes. For purely command-line operation, useradd is the preferred method. system-config-users doesn't fit in the same category as the other two. It is a GUI program. It's implemented in terms of userhelper, which has a command line I/O interface more suitable for use as the ...



Top 50 recent answers are included