GNU/Linux >> Linux Esercitazione >  >> Linux

Crea e rimuovi utenti CentOS

In questo articolo, ti mostreremo come creare e rimuovere utenti/account CentOS. Non creeremo/elimineremo account cPanel qui!

Devi essere loggato come root per poter creare nuovi account.

Possono verificarsi situazioni in cui desideri creare utenti sul tuo server CentOS. Per creare un nuovo utente, usa il comando:

adduser username

Successivamente, imposta la password per il nuovo utente, in modo che possa accedere:

passwd username

Puoi anche controllare i valori predefiniti per adduser comando con il -D argomento:

root@web [~]# adduser -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes

Esempio per creare un utente CentOS e impostare una password per esso:

root@web [~]# adduser tonyw
root@web [~]# passwd tonyw
Changing password for user tonyw.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
root@web [~]#
root@web [~]# cd /home/tonyw
root@web [/home/tonyw]# ls
./  ../  .bash_logout  .bash_profile  .bashrc  .zshrc
root@web [/home/tonyw]#

Per rimuovere un account CentOS, usa:

userdel -r username

Il -r l'argomento rimuoverà la directory dell'utente.


Linux
  1. Come concedere e rimuovere i privilegi di Sudo agli utenti su Ubuntu

  2. Crea ed elimina utenti in Ubuntu 20.04

  3. Utenti e Gruppi

  4. Crea un utente sudo in CentOS

  5. Come creare/rimuovere e montare un filesystem Stratis in CentOS/RHEL 8

Come aggiungere utenti a Sudoers (e rimuovere) su Ubuntu

Come aggiungere e rimuovere utenti in Debian

Come aggiungere e rimuovere utenti in CentOS 8

Come creare e gestire nuovi utenti su Linux

Come creare utenti e gruppi in CentOS7?

Crea e configura un utente in MSSQL