Ultima modifica:
Bash:
useradd -d /home/user -s /bin/bash user
usermod -aG sudo,audio,video user
mkdir /home/user/
chown user:user /home/user/
passwd user
su user
Se non metti la flag -d o -m non crea niente, fai useradd --help e vedi:- è normale che non sia stato creato l'ambiente utente con la relativa directory in automatico?
Bash:
-d, --home-dir HOME_DIR home directory of the new account
-m, --create-home create the user's home directory
Essendo che non hai selezionato nessuna shell con la flag -s, --shell credo abbia impostato di default /bin/sh, btw basta che fai chsh e metti /bin/bash, ad esempio se io catto /etc/passwd esce così:- perché in passwd avevo /bin/sh invece di /bin/bash come per gli altri utenti?
Bash:
root@mint:~# cat /etc/passwd | grep user
hplip:x:120:7:HPLIP system user,,,:/run/hplip:/bin/false
user:x:1001:1001::/home/user:/bin/bash
root@mint:~#