Greetings all,
I just installed 16 LTS on a Power MAC G4. After rebooting into the newly installed
system, I was prompted to update the system with the latest versions of some
of the applications installed. All attempts failed, indicating a network issue.
However, the network is working just fine for everything else. So I surmised
that it must be due to permissions. So I attempted to su to root, but I cannot. I
was never prompted to provide a root password during the install. I have considered
booting to single-user mode, and setting the root password. But before doing so, I
thought I might ask why the ability to set a root password is not provided
during install. I come from ~30yrs on BSD, and UNIX, and this is highly unusual.
No it's not.
Considering disabling root password is the standard practice in Ubuntu, and Ubuntu is the dominant GNU/Linux distro.
You just don't do things with a root password. You just use sudo when you need root access.
Here's how you get a root prompt:
ouroumov@Box:~/Desktop$ sudo su
[sudo] password for ouroumov:
root@Box:/home/ouroumov/Desktop#
Hi @chris.h, I remember the first time I saw the sudo security model, too, and I believe it was about 12 years ago. Only a few things were impossible to do and all became moot with time. The sudo method has become highly ubiquitous in Linux.
The paradigm is the root user has no password so thereās no way to even brute force the root account - the only always-known account name in all of *nix at that point. Of course, it just shifts the security model to a user account with āsudoerā permissions.
BTW, replace su with sudo -i to pretty much do the same thing.
Also, I noticed su = switch user has strangely morphed into su = super user somewhere along the way, too.
Installer should have asked for password during install when setting up user account options
installer usually adds username to group access for sudo, but not su.
you can add user to su group after install, but the possibility of forgetting to exit root account is why single sudo commands are better option
Thanks for the reply, @Bill_MI!
Indeed. It really comes down to me getting an understanding of the
different philosophies ā UNIX vs Linux.
Like it, or not. Iām just going to have to learn to live with it, if I want to adopt
the use of a Linux based OS, on top of the all the UNIX based servers, and
desktops I currently maintain.
Thereās some subtle environmental differences and itās been a while since I looked. One quick one is how $PATH differs but I recall it extended to using /root/.bashrc but that no longer seems to be the case.
I wonāt count the benign difference in the directory you end up in.
Sudo i takes also you to root. However, the -i (simulate initial login) option runs the shell specified by the
password database entry of the target user as a login shell. This means that login-specific resource files such as .profile, .bashrc or .login will be read and executed by the shell.
for pretty much any use I can personally envisage, sudo su should suffice. But, I would be interested to hear of any advantage from anyone else regarding the other method.