gibt es eine möglichkeit useradd zu sagen, er möchte user erst ab einer bestimmten uid anlegen?
es gibt
Code: Alles auswählen
adduser --firstuid
irgendjemand eine idee? ich benutze etch
Code: Alles auswählen
adduser --firstuid
Code: Alles auswählen
hosenscheisser:/home/s# adduser --no-create-home --gecos "" hans <<EOF
> qwer
> qwer
> EOF
Adding user `hans' ...
Adding new group `hans' (1002) ...
Adding new user `hans' (1002) with group `hans' ...
Not creating home directory `/home/hans'.
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
hosenscheisser:/home/s#
Code: Alles auswählen
adduser --no-create-home --gecos "" test <<EOF
das muss ich mit STRG-c abbrechen!Enter new UNIX password: Retype new UNIX password: No password supplied
Enter new UNIX password: Retype new UNIX password: No password supplied
passwd: Authentication token manipulation error
passwd: password unchanged
Use of uninitialized value in chop at /usr/sbin/adduser line 537.
Use of uninitialized value in pattern match (m//) at /usr/sbin/adduser line 538.
Nochmal versuchen? [J/n] Enter new UNIX password: Retype new UNIX password: No password supplied
Enter new UNIX password: Retype new UNIX password: No password supplied
Enter new UNIX password: Retype new UNIX password: No password supplied
passwd: Authentication token manipulation error
passwd: password unchanged
Use of uninitialized value in chop at /usr/sbin/adduser line 537.
Use of uninitialized value in pattern match (m//) at /usr/sbin/adduser line 538.
Nochmal versuchen? [J/n] Enter new UNIX password: Retype new UNIX password: No password supplied
Code: Alles auswählen
#!/bin/bash
USERNAME='deinwunschname'
PASSWORD='deinpassword'
adduser --gecos "" $USERNAME <<EOF
$PASSWORD
$PASSWORD
EOF
Code: Alles auswählen
adduser --gecos "" test <<EOF
>test
>test
>EOF
Code: Alles auswählen
passwd test <<EOF
> test
> test
> EOF
Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match
passwd: Authentication information cannot be recovered
passwd: password unchanged
Code: Alles auswählen
...
adduser --gecos "" --disabled-password $USER
...
Code: Alles auswählen
...
usermod -p $(mkpasswd $PASS) $USER
...