maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   SUDO usage??? (https://talk.maemo.org/showthread.php?t=47733)

roja 2010-03-18 23:39

SUDO usage???
 
Guys, I am new to Linux, and trying to learn. in X-term,
I put: "sudo", then it gives me "Usage -K etc", I wonder what these "-K" "-V" for? and how I can use them???

I use "su" to gain root in opensuse, what does "sudo" mean in N900(Busybox)??? Please educate me, many thanks.

roja 2010-03-19 00:25

Re: SUDO usage???
 
and if i just type "sudo" and enter in X term, what does it do???

nbc 2010-03-19 00:28

Re: SUDO usage???
 
A good tutorial for beginners http://www.unixtutorial.org/2008/01/sudo-tutorial/

Good reading

roja 2010-03-19 00:43

Re: SUDO usage???
 
thanks nbc, however i still wonder if i just type "sudo" and enter in X term on n900, what does it do???

fuzzbuzz 2010-03-19 00:45

Re: SUDO usage???
 
By default, you're not allowed to become root on the N900.

To do that, you must first install a package called "rootsh".

After that, you may type "sudo gainroot" to become root. At that point, if you like, you can set your own root password. This would allow you to type "su" and enter your root password to become root, like in Suse.

"sudo" is used to allow a user to execute a command as THEMSELVES, but with root privileges. It is also available on Suse, and all other unixes.

nbc 2010-03-19 00:54

Re: SUDO usage???
 
absolutely nothing. sudo in default usage take at list one argument, this argument is the command you want to use under another account. An example that won't work

Code:

sudo cat /etc/sudoers
If you really want to learn linux, try with another distrib on a desktop computer. the n900 has a linux but a really weird linux compare to other distributions.

roja 2010-03-19 00:58

Re: SUDO usage???
 
Thanks fuzzbuzz and nbc, so my understanding is that simply type "sudo" and enter will do nothing on n900 but gives me a list of parameters I can use with sudo command, correct???

nbc 2010-03-19 01:01

Re: SUDO usage???
 
Yes you're right. If you want to complete sudo documentation "man sudo" doesn't work on maemo (no man) but you can find it on internet : http://www.courtesan.com/sudo/man/sudo.html

reading reading, doing, the hard path to knowledge ;)

roja 2010-03-19 01:01

Re: SUDO usage???
 
and if i would like to gain root, i will need to install "rootsh", and then can i use "sudo" to gain root? or it has to be "sudo gainroot?"

nbc 2010-03-19 01:04

Re: SUDO usage???
 
with rootsh just use the command "root"

Code:

~ $ root

BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900-51-1:~#

Be careful when you're root

roja 2010-03-19 01:05

Re: SUDO usage???
 
thanks nbc, in term of linux distribution, i was thinking about fedora, however someone told me it is unstable, what is your suggestion fedora or ubuntu?

nbc 2010-03-19 01:09

Re: SUDO usage???
 
You really don't care. The two are stable enough (if you don't take the development one). It's more a matter of feeling and guts at least for desktop usage.

And you can always install the two and try them. And buy some good linux books.

roja 2010-03-19 01:11

Re: SUDO usage???
 
thanks nbc, in suse, there are lots of things a user can't do without "root" to "protect" the system, if a user messed up, just delete that "user". I wonder if this applies to X term on N900, e.g if you are not "root", you can't do anything to harm/mess up the OS, and when you have gained "root", then a single command can kill n900 off???

nbc 2010-03-19 01:15

Re: SUDO usage???
 
Yes, it's hard to broke the system without root on desktop distrib. As far as I've looked, the security seems not bad at all on n900 but I'm not sure the phone will work well if you delete all the files in /home/user so even without root, be careful when playing with terminal.

rambo 2010-03-19 07:05

Re: SUDO usage???
 
Quote:

Originally Posted by roja (Post 572724)
thanks nbc, in term of linux distribution, i was thinking about fedora, however someone told me it is unstable, what is your suggestion fedora or ubuntu?

For even remote similarity with maemo get Ubuntu, both are "Debian based" and in many things follow "the Debian way".

I could start a rant about the annoying little differences between various distros (especially Debian based vs Redhat based [for example Ubuntu vs Fedora]) that makes life slightly difficult when you're mostly using/administering one but still have to regularly visit the other too.

roja 2010-03-21 21:41

Re: SUDO usage???
 
guys, where is "/home/user" folder? I can only see MyDocs folder in X Term, any ideas???

b666m 2010-03-21 21:57

Re: SUDO usage???
 
Quote:

Originally Posted by roja (Post 576336)
guys, where is "/home/user" folder? I can only see MyDocs folder in X Term, any ideas???

if you can see MyDocs via "ls" then you are in /home/user ^^

roja 2010-03-21 22:03

Re: SUDO usage???
 
b666m, thanks for your reply. been reading some of your useful replies to others' posts. Quick question for you, i have a UK n900(unbranded), i wonder if there is any benefits to flash the device(it is quite new, no dev/testing app installed)???

Many thanks

tpaixao 2010-03-21 22:07

Re: SUDO usage???
 
Quote:

Originally Posted by roja (Post 576336)
guys, where is "/home/user" folder? I can only see MyDocs folder in X Term, any ideas???

it's one level up. just do
Code:

cd ..
MyDocs is a directory in /home/user/ that is mapped to N900 in the GUI.

b666m 2010-03-21 22:09

Re: SUDO usage???
 
Quote:

Originally Posted by roja (Post 576364)
b666m, thanks for your reply. been reading some of your useful replies to others' posts. Quick question for you, i have a UK n900(unbranded), i wonder if there is any benefits to flash the device(it is quite new, no dev/testing app installed)???

i never flashed my device since i got it mid of december.
it's still in a very good shape and fast. :)

so in my opinion you only have to flash your device if you're noticing any problems ("speed" problems, crashing apps and so on)

roja 2010-03-21 22:23

Re: SUDO usage???
 
the touch screen vibration sometime can be very strong, but sometime can be very weak as well, so i am thinking maybe flash the device may make it behave properly, any ideas?


All times are GMT. The time now is 07:43.

vBulletin® Version 3.8.8