why does sudo work on Linux but not Android?

Clash Royale CLAN TAG#URR8PPP
up vote
20
down vote
favorite
I have not had the chance to read enough about Android, Linux, or UNIX to answer this myself. sudo works on a Linux machine but doesn't work on Android unless you root the mobile device (e.g. Samsung GT-N8013). Why does the mobile device require to be rooted, but not the typical Linux install?
The context of my question is related to
https://stackoverflow.com/questions/14019698/adb-shell-sudo-on-windows-7/14019726#14019726
(Also, is there any way for a program to ask to run as root on Android, the same way you have escalation of privileges to "run as administrator" on Windows? If you think this question should be on its own thread, I can create one)
sudo root android privileges
add a comment |Â
up vote
20
down vote
favorite
I have not had the chance to read enough about Android, Linux, or UNIX to answer this myself. sudo works on a Linux machine but doesn't work on Android unless you root the mobile device (e.g. Samsung GT-N8013). Why does the mobile device require to be rooted, but not the typical Linux install?
The context of my question is related to
https://stackoverflow.com/questions/14019698/adb-shell-sudo-on-windows-7/14019726#14019726
(Also, is there any way for a program to ask to run as root on Android, the same way you have escalation of privileges to "run as administrator" on Windows? If you think this question should be on its own thread, I can create one)
sudo root android privileges
It should be insudoerslist to getsudo. Its not in Android an Ubuntu
â user3539
Dec 26 '12 at 6:14
add a comment |Â
up vote
20
down vote
favorite
up vote
20
down vote
favorite
I have not had the chance to read enough about Android, Linux, or UNIX to answer this myself. sudo works on a Linux machine but doesn't work on Android unless you root the mobile device (e.g. Samsung GT-N8013). Why does the mobile device require to be rooted, but not the typical Linux install?
The context of my question is related to
https://stackoverflow.com/questions/14019698/adb-shell-sudo-on-windows-7/14019726#14019726
(Also, is there any way for a program to ask to run as root on Android, the same way you have escalation of privileges to "run as administrator" on Windows? If you think this question should be on its own thread, I can create one)
sudo root android privileges
I have not had the chance to read enough about Android, Linux, or UNIX to answer this myself. sudo works on a Linux machine but doesn't work on Android unless you root the mobile device (e.g. Samsung GT-N8013). Why does the mobile device require to be rooted, but not the typical Linux install?
The context of my question is related to
https://stackoverflow.com/questions/14019698/adb-shell-sudo-on-windows-7/14019726#14019726
(Also, is there any way for a program to ask to run as root on Android, the same way you have escalation of privileges to "run as administrator" on Windows? If you think this question should be on its own thread, I can create one)
sudo root android privileges
sudo root android privileges
edited May 23 '17 at 12:40
Communityâ¦
1
1
asked Dec 26 '12 at 0:18
T. Webster
3893517
3893517
It should be insudoerslist to getsudo. Its not in Android an Ubuntu
â user3539
Dec 26 '12 at 6:14
add a comment |Â
It should be insudoerslist to getsudo. Its not in Android an Ubuntu
â user3539
Dec 26 '12 at 6:14
It should be in
sudoers list to get sudo. Its not in Android an Ubuntuâ user3539
Dec 26 '12 at 6:14
It should be in
sudoers list to get sudo. Its not in Android an Ubuntuâ user3539
Dec 26 '12 at 6:14
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
19
down vote
accepted
sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian.
Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so there is no need to provide an interactive way for an enduser to run a command as system administrator.
In general you can use su instead of sudo to run a command as a different user but you have to know the credentials for the target user for su (for sudo you have to know the credentials of the user running the command)
add a comment |Â
up vote
9
down vote
sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.
add a comment |Â
up vote
8
down vote
The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access.
As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.
add a comment |Â
up vote
4
down vote
You touch on a critical point in your question: a typical Linux install IS rooting: you boot from a Live CD and overwrite the bootsector of the harddrive to load your own code.
It's just that rooting a PC is less arduous than on a semi embedded device like a phone so that people tend to forget that installing a second OS with dual-boot is essentially rooting (the only thing that will fight you on this is the BIOS with secure boot but that can be easily reset).
And the OS on the Android device just doesn't come with the sudo command (or similar) installed.
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
19
down vote
accepted
sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian.
Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so there is no need to provide an interactive way for an enduser to run a command as system administrator.
In general you can use su instead of sudo to run a command as a different user but you have to know the credentials for the target user for su (for sudo you have to know the credentials of the user running the command)
add a comment |Â
up vote
19
down vote
accepted
sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian.
Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so there is no need to provide an interactive way for an enduser to run a command as system administrator.
In general you can use su instead of sudo to run a command as a different user but you have to know the credentials for the target user for su (for sudo you have to know the credentials of the user running the command)
add a comment |Â
up vote
19
down vote
accepted
up vote
19
down vote
accepted
sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian.
Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so there is no need to provide an interactive way for an enduser to run a command as system administrator.
In general you can use su instead of sudo to run a command as a different user but you have to know the credentials for the target user for su (for sudo you have to know the credentials of the user running the command)
sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian.
Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so there is no need to provide an interactive way for an enduser to run a command as system administrator.
In general you can use su instead of sudo to run a command as a different user but you have to know the credentials for the target user for su (for sudo you have to know the credentials of the user running the command)
answered Dec 26 '12 at 1:22
Ulrich Dangel
20k25671
20k25671
add a comment |Â
add a comment |Â
up vote
9
down vote
sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.
add a comment |Â
up vote
9
down vote
sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.
add a comment |Â
up vote
9
down vote
up vote
9
down vote
sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.
sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.
edited Apr 13 '17 at 12:36
Communityâ¦
1
1
answered Dec 26 '12 at 1:15
Warren Young
53.3k8140144
53.3k8140144
add a comment |Â
add a comment |Â
up vote
8
down vote
The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access.
As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.
add a comment |Â
up vote
8
down vote
The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access.
As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.
add a comment |Â
up vote
8
down vote
up vote
8
down vote
The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access.
As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.
The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access.
As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.
answered Dec 26 '12 at 0:54
Aaron D. Marasco
3,4681321
3,4681321
add a comment |Â
add a comment |Â
up vote
4
down vote
You touch on a critical point in your question: a typical Linux install IS rooting: you boot from a Live CD and overwrite the bootsector of the harddrive to load your own code.
It's just that rooting a PC is less arduous than on a semi embedded device like a phone so that people tend to forget that installing a second OS with dual-boot is essentially rooting (the only thing that will fight you on this is the BIOS with secure boot but that can be easily reset).
And the OS on the Android device just doesn't come with the sudo command (or similar) installed.
add a comment |Â
up vote
4
down vote
You touch on a critical point in your question: a typical Linux install IS rooting: you boot from a Live CD and overwrite the bootsector of the harddrive to load your own code.
It's just that rooting a PC is less arduous than on a semi embedded device like a phone so that people tend to forget that installing a second OS with dual-boot is essentially rooting (the only thing that will fight you on this is the BIOS with secure boot but that can be easily reset).
And the OS on the Android device just doesn't come with the sudo command (or similar) installed.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
You touch on a critical point in your question: a typical Linux install IS rooting: you boot from a Live CD and overwrite the bootsector of the harddrive to load your own code.
It's just that rooting a PC is less arduous than on a semi embedded device like a phone so that people tend to forget that installing a second OS with dual-boot is essentially rooting (the only thing that will fight you on this is the BIOS with secure boot but that can be easily reset).
And the OS on the Android device just doesn't come with the sudo command (or similar) installed.
You touch on a critical point in your question: a typical Linux install IS rooting: you boot from a Live CD and overwrite the bootsector of the harddrive to load your own code.
It's just that rooting a PC is less arduous than on a semi embedded device like a phone so that people tend to forget that installing a second OS with dual-boot is essentially rooting (the only thing that will fight you on this is the BIOS with secure boot but that can be easily reset).
And the OS on the Android device just doesn't come with the sudo command (or similar) installed.
edited Aug 23 at 8:58
answered Dec 26 '12 at 5:17
ratchet freak
1412
1412
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f59434%2fwhy-does-sudo-work-on-linux-but-not-android%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It should be in
sudoerslist to getsudo. Its not in Android an Ubuntuâ user3539
Dec 26 '12 at 6:14