Difference between revisions of "Ubuntu Info"
Line 28: | Line 28: | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
[jamie@ns1.dawgland.com:~]$ sudo passwd david | [jamie@ns1.dawgland.com:~]$ sudo passwd david | ||
+ | </pre> | ||
+ | <br /><br /> | ||
+ | |||
+ | Now that the new user "david" has been created, you need to become that user. Since you are already logged in as your normal user, to become the "david" user, or whatever username you are going with, type this command to become that user: | ||
+ | <pre style="color:blue"> | ||
+ | [jamie@ns1.dawgland.com:~]$ su - david | ||
</pre> | </pre> | ||
<br /><br /> | <br /><br /> |
Revision as of 23:03, 29 January 2023
Ubuntu Linux - One of the Most Popular Distributions of Linux!
Ubuntu Linux is a very popular distribution of Linux, especially among new users and hobbyists. It is comes in two basic editions, the desktop edition and the server version.
As the default Ubuntu download servers are usually very busy, I have found this URL to be pretty fast most of the time:
http://mirror.it.ubc.ca/ubuntu-releases/
Ubuntu is based on the Debian distribution, one of the oldest distros, originally based on BSD UNIX and it's packages are managed using the same Debian tools apt, though the other Debian package manager, dkkg, can also be used.
SSH Passwordless Login Setup - Connect to a Linux server using secure shell keys instead of using a name and password, which is MUCH more secure!
Here is an example of how to setup SSH key login from one Linux machine to another, using only Secure Shell keys instead of name and password, making a much more secure login method, beside being much faster and more efficient, not to mention allowing for much more complex scripting and other types of automation.
In this example, I will use two Linux machines, named "ns1" and "ubunsrv1". Their fully qualified domain names(FQDN) are ns1.dawgland.com and ubunsrv1.dwagland.com. Although ns1.dawgland.com is my home network domanin name server(DNS) running Rocky Linux(Based on Red Hat Enterprise Linux source code), it is irrelevant in this example, as the target machine, ubunsrv1.dawgland.com, is running the current long term stable release of Ubuntu Server.
To start with, while logged into the main server, ns1, create the user's SSH keys, if not already done. Here is an example of how to create those keys as user "david" on the ns1.dawgland.com machine. Note that I used the "G" switch to add the user "david" to the "wheel" group, the adminstrator group/sudoer group on Red Hat based systems. On Ubuntu, substitute the "sudo" group instead of the "wheel" group to be able to run commands using sudo:
[jamie@ns1.dawgland.com:~]$ sudo useradd -c "David J. Anderson" -G wheel -m -s /bin/bash david
Then, set the password for the new user "david":
[jamie@ns1.dawgland.com:~]$ sudo passwd david
Now that the new user "david" has been created, you need to become that user. Since you are already logged in as your normal user, to become the "david" user, or whatever username you are going with, type this command to become that user:
[jamie@ns1.dawgland.com:~]$ su - david