Click here to Skip to main content
15,884,629 members
Home / Discussions / Linux Programming
   

Linux Programming

 
GeneralRe: How to "provide password " ? Pin
k50543-May-23 8:06
mvek50543-May-23 8:06 
GeneralRe: How to "provide password " ? Pin
jschell3-May-23 9:44
jschell3-May-23 9:44 
GeneralRe: How to "provide password " ? Pin
Richard MacCutchan3-May-23 21:16
mveRichard MacCutchan3-May-23 21:16 
AnswerRe: How to "provide password " REMOVED Pin
Dave Kreskowiak4-May-23 3:05
mveDave Kreskowiak4-May-23 3:05 
AnswerRe: How to "provide password " REMOVED Pin
Victor Nijegorodov4-May-23 6:18
Victor Nijegorodov4-May-23 6:18 
GeneralRe: How to "provide password " REMOVED Pin
Richard MacCutchan5-May-23 3:51
mveRichard MacCutchan5-May-23 3:51 
QuestionMessage Closed Pin
2-May-23 4:58
Member 149687712-May-23 4:58 
AnswerRe: Why is "su" failing and "sudo su " works ? Pin
k50542-May-23 5:29
mvek50542-May-23 5:29 
su with no arguments runs a shell as root. The password prompt is looking for root's password, not the current user. Similarly su -u bob will prompt for the password for bob. If the current process has root permissions, then no password prompt is

sudo, on the other hand prompts for the current users password. As you probably know, sudo then checks /etc/sudoers to confirm that the current user has permission to run sudo.

So sudo su prompts for the current users password. If that succeeds, then the user is given root permissions and the command su is executed. As the invoking process to su has root permissions, no password prompt is issued, and su starts a root level shell. If you look at your process table, you will see that you have 3 processes now running, sudo, su, bash. Compare that to just sudo bash, or sudo -s, which will only have 2 processes running, namely su and bash.
Keep Calm and Carry On

GeneralMessage Closed Pin
2-May-23 6:33
Member 149687712-May-23 6:33 
AnswerRe: Why is "su" failing and "sudo su " works - revised ? Pin
k50542-May-23 7:08
mvek50542-May-23 7:08 
GeneralRe: Why is "su" failing and "sudo su " works - revised ? Pin
Dr.Walt Fair, PE20-Feb-24 10:59
professionalDr.Walt Fair, PE20-Feb-24 10:59 
GeneralMessage Closed Pin
3-May-23 5:37
Member 149687713-May-23 5:37 
GeneralRe: Why is "su" failing and "sudo su " works - revised ? Pin
Richard MacCutchan2-May-23 22:04
mveRichard MacCutchan2-May-23 22:04 
GeneralRe: Why is "su" failing and "sudo su " works - revised ? Pin
Richard MacCutchan3-May-23 5:48
mveRichard MacCutchan3-May-23 5:48 
QuestionMessage Closed Pin
30-Apr-23 17:59
Member 1496877130-Apr-23 17:59 
AnswerRe: Debugging "command" .... Pin
Richard MacCutchan30-Apr-23 21:16
mveRichard MacCutchan30-Apr-23 21:16 
QuestionMessage Closed Pin
30-Apr-23 7:36
Member 1496877130-Apr-23 7:36 
AnswerRe: Restructuring (Linux) device partitions Pin
Richard MacCutchan30-Apr-23 6:02
mveRichard MacCutchan30-Apr-23 6:02 
PraiseRe: Restructuring (Linux) device partitions Pin
Olif Oftimis5-Aug-23 14:27
Olif Oftimis5-Aug-23 14:27 
AnswerRe: Restructuring (Linux) device partitions Pin
Dave Kreskowiak30-Apr-23 6:20
mveDave Kreskowiak30-Apr-23 6:20 
PraiseRe: Restructuring (Linux) device partitions Pin
Olif Oftimis5-Aug-23 14:28
Olif Oftimis5-Aug-23 14:28 
QuestionMessage Closed Pin
22-Apr-23 15:04
Member 1496877122-Apr-23 15:04 
AnswerRe: adding virtual rfcomm - repost Pin
Richard MacCutchan22-Apr-23 21:12
mveRichard MacCutchan22-Apr-23 21:12 
QuestionMessage Closed Pin
2-Apr-23 10:46
Member 149687712-Apr-23 10:46 
AnswerRe: Please help me understanding Bluetooth "socket"usage ... Pin
Richard MacCutchan2-Apr-23 22:22
mveRichard MacCutchan2-Apr-23 22:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.