Create a Sudo User on Debian or Ubuntu Rumi, January 29, 2017 Log in to your server as the root user. ssh root@server_ip_address Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create. adduser username Set and confirm the new user’s password at the prompt. A strong password is highly recommended! Set password prompts: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Follow the prompts to set the new user’s information. It is fine to accept the defaults to leave all of this information blank. User information prompts: Changing the user information for username Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Use the usermod command to add the user to the sudo group. usermod -aG sudo username By default, on Ubuntu, members of the sudo group have sudo privileges. Test sudo access on new user account. Use the su command to switch to the new user account. su - username As the new user, verify that you can use sudo by prepending “sudo” to the command that you want to run with superuser privileges. sudo command_to_run For example, you can list the contents of the /root directory, which is normally only accessible to the root user. sudo ls -la /root The first time you use sudo in a session, you will be prompted for the password of the user account. Enter the password to proceed. Output: [sudo] password for username: If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges. Related Administrations Configurations (Linux) DebianSudoUbuntu
VBoxHeadless Running Virtual Machines With VirtualBox On A Headless Debian/ubuntu Server August 3, 2012December 4, 2017 I have implemented this on Debian 6 (Squeeze system) with the IP address 192.168.0.100 where I’m logged in as root. Installing VirtualBox To install VirtualBox 4.1 on our Debian server, we open /etc/apt/sources.list… added this line- deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free Use appropriate OS source list from https://www.virtualbox.org/wiki/Linux_Downloads Then we… Read More
Administrations Install gnome via tasksel on Debain 12 March 3, 2024 Tasksel is already installed on Debian 12, so you don’t need to install it. However, if for some reason tasksel is not installed on your system, you can install it via the command below sudo apt install tasksel To install Gnome via tasksel, you need first to run tasksel sudo… Read More
Rsync upload local files without replacing remote files May 27, 2023May 27, 2023 Disclaimer: This is basically one way sync- use at your own risk and dry run before any production deployment. Suppose you have a list of files on a remote host, some of which already exist locally. What you want is to transfer only those files that are not found locally…. Read More