Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2581  / 2 Years ago, sat, september 24, 2022, 6:35:43

I have Linux Virtual machine (ubuntu 12.04) installed on my Mac OS.



On my terminal,



[email protected]:~$ su
password:
su : Authentication failure

[email protected]:~$ ls -lth /bin/su
-rwsr-sr-x 1 root root 36K Sep 12 2012 /bin/su


But the following works:



[email protected]:~$ sudo ls
[sudo] password for user:
(....lists the directories)

[email protected]:~$ sudo -s
[sudo] password for user:
[email protected]:~#


Hence the question is,
why sudo -s works and logs in as root, while su results in authentication failure.
I typed the passwords correctly each time.
Also sudo ls works


More From » 12.04

 Answers
4

In Ubuntu by default, the root user has a disabled password and the mechanism available for general users to use root permissions is sudo. su with no arguments attempts to change the current user to root, and since it is disabled....


[#23748] Monday, September 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
huovie

Total Points: 234
Total Questions: 99
Total Answers: 105

Location: Central African Republic
Member since Sun, Feb 26, 2023
1 Year ago
;