مرحله 18 )
Users, passwords and authentication
Start by creating a password for the root account. You can lock the account later if you don't plan on using it with the passwd -l root command.
# passwd
Setting up your default user:
# useradd -m username
# passwd username
Add the user to necessary groups, and give it the proper interactive shell. Debian uses bash as its default interactive shell, but you can choose whatever you like.
# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev username
# usermod -s /bin/bash username
کاربران، رمزهای عبور و احراز هویت
# passwd
# useradd -m username
# passwd username
# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev username
# usermod -s /bin/bash username
عکس 1
Next, you need to decide if you want sudo or doas in order to elevate your user’s privileges for updates, etc… This is your choice, though I personally prefer doas.
For doas:
# apt install opendoas
# echo "permit username" > /etc/doas.conf
For sudo:
# apt install sudo
# usermod -aG sudo username
Debian provides a pre-configured sudoers file, and you probably don’t need to change anything, but it’s wise to verify that the line under “allow members of group sudo …” is not commented out with the cat /etc/sudoers command.
Look at the output, and if the line is commented out, use the visudo command and uncomment it.
apt install sudo
usermod -aG sudo username
cat /etc/sudoers
دبیان یک فایل sudoers از پیش پیکربندی شده ارائه میدهد و احتمالاً نیازی به تغییر چیزی ندارید، اما بهتر است که مطمئن شوید خط زیر «allow members of group sudo …” با دستور cat /etc/sudoers به صورت کامنت درنیامده باشد.
عکس های 2 و 3 و 4