Skip to main content
Post Undeleted by Luciano Andress Martini
Post Deleted by Luciano Andress Martini
added 160 characters in body
Source Link

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case if they neededneed to run any command with sudo it checks at start first, asking the password only one time.

The condition works like this: if sudo are executing the true command correctly, it will return true for the if condition, then sudo is enabled and the user typed the password correctly, else you typed the password wrong, or sudo is not enabled, them the script script must not continue.

The other commands do not need to ask sudo password, because your authentication are sucessfully in first time (but this depends on the sudo configuration, so this scripts depends much in the environment configuration)

The 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if sudo are executing the true command correctly, it will return true for the if condition, then sudo is enabled, else you typed the password wrong, or sudo is not enabled, them the script must not continue.

The other commands do not need to ask sudo password, because your authentication are sucessfully in first time (but this depends on the sudo configuration, so this scripts depends much in the environment configuration)

The 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case if they need to run any command with sudo it checks at start first, asking the password only one time.

The condition works like this: if sudo are executing the true command correctly, it will return true for the if condition, then sudo is enabled and the user typed the password correctly, else you typed the password wrong or sudo is not enabled, the script must not continue.

The other commands do not need to ask sudo password, because your authentication are sucessfully in first time (but this depends on the sudo configuration, so this scripts depends much in the environment configuration)

The 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

added 160 characters in body
Source Link

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if true inside sudo are returningexecuting the true command correctly, it will return true for the if condition, then sudo is enabled, else you typed the password wrong, or sudo is not enabled, them the script must not continue.

The other commands do not need to ask sudo password, because your authentication are sucessfully in first time. (but this depends on the sudo configuration, so this scripts depends much in the environment configuration)

theThe 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if true inside sudo are returning true, then sudo is enabled.

The other commands do not need to ask sudo password, because your authentication sucessfully in first time.

the 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if sudo are executing the true command correctly, it will return true for the if condition, then sudo is enabled, else you typed the password wrong, or sudo is not enabled, them the script must not continue.

The other commands do not need to ask sudo password, because your authentication are sucessfully in first time (but this depends on the sudo configuration, so this scripts depends much in the environment configuration)

The 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

spelling
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if true inside sudo are returning true, themthen sudo is enabled.

The other commands doesdo not need to ask sudo password, because your authentication sucessfully in first time.

the 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if true inside sudo are returning true, them sudo is enabled.

The other commands does not need to ask sudo password, because your authentication sucessfully in first time.

the 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

As I see in this script. It is just checking if sudo is enabled, that is it..

true just returns true.

So in this case they needed to run any command with sudo, if true inside sudo are returning true, then sudo is enabled.

The other commands do not need to ask sudo password, because your authentication sucessfully in first time.

the 'echo password ok' demonstrate that too. the shell script will not ask the password anymore.

added 120 characters in body
Source Link
Loading
spelling
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113
Loading
Source Link
Loading