Re: Sudo instead of SU

2007-04-21 Thread Thilo Six
Kamaraju S Kusumanchi wrote the following on 21.04.2007 02:02:
 Masatran, R. Deepak wrote:
 
 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?

 
 I will mention this since sooner or later (I think) you will hit this.
 
 su - gives you a root shell so you can execute multiple commands (one after
 another) as being root. sudo is usually used to run a single command as
 root (ex :- sudo apt-get update). If instead, you want to use sudo to gain
 access to a root shell, you can use
 
 sudo -s
 sudo /bin/bash

sudo -i

bye Thilo
-- 
i am on Ubuntu 2.6 KDE
- some friend of mine

gpg key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-21 Thread Joe Hart
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thilo Six wrote:
 Kamaraju S Kusumanchi wrote the following on 21.04.2007 02:02:
 Masatran, R. Deepak wrote:

 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?

 I will mention this since sooner or later (I think) you will hit this.

 su - gives you a root shell so you can execute multiple commands (one after
 another) as being root. sudo is usually used to run a single command as
 root (ex :- sudo apt-get update). If instead, you want to use sudo to gain
 access to a root shell, you can use

 sudo -s
 sudo /bin/bash
 
 sudo -i
 
 bye Thilo

Nothing like posting what was already in this thread.

Note that doing things with sudo the way Ubuntu does it is dangerous
because if someone hacks into your computer (not likely if you have good
security set up) or someone happens to come by your computer while sudo
still keeps the password in memory, your giving full root access to said
interloper.  That's why you only have to type the password once for
multiple sudo commands.  (BTW, the timeout is adjustable)

A much safer way is to use su -c foo and only issue the one command,
but the quotes are needed, and that can become tiresome.

But remember, it is your system and how you choose to use it is your
decision.  Just keep good security practices in mind and you're likely
to enjoy happy computing a lot longer.

Joe

- --
Registerd Linux user #443289 at http://counter.li.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGKl/UiXBCVWpc5J4RAnevAKC2zikIGq0usPlcVnyztvNbEtATqgCfWqTh
Ga1ddgFbRMab9PUOJLiVM90=
=bKeu
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-21 Thread Thilo Six
Joe Hart wrote the following on 21.04.2007 21:02:

snip

 Note that doing things with sudo the way Ubuntu does it is dangerous
 because if someone hacks into your computer (not likely if you have good
 security set up) or someone happens to come by your computer while sudo
 still keeps the password in memory, your giving full root access to said
 interloper.  That's why you only have to type the password once for
 multiple sudo commands.  (BTW, the timeout is adjustable)

I hit STRG+ALT+l everytime i leave the computer.
But that´s not only to prevent someone from being root on my box but also to
prevent misusing e.g. my mailaccount what can be as dangerous.

Security is more a matter of behavior then of technic imho.
That´s why pfishing so so successful these days.

 A much safer way is to use su -c foo and only issue the one command,
 but the quotes are needed, and that can become tiresome.
 
 But remember, it is your system and how you choose to use it is your
 decision.  Just keep good security practices in mind and you're likely
 to enjoy happy computing a lot longer.
 
 Joe

bye Thilo
-- 
i am on Ubuntu 2.6 KDE
- some friend of mine

gpg key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-20 Thread Kamaraju S Kusumanchi
Masatran, R. Deepak wrote:

 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?
 

I will mention this since sooner or later (I think) you will hit this.

su - gives you a root shell so you can execute multiple commands (one after
another) as being root. sudo is usually used to run a single command as
root (ex :- sudo apt-get update). If instead, you want to use sudo to gain
access to a root shell, you can use

sudo -s
sudo /bin/bash

my random 2 cents
raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-17 Thread Chris Lale
Greg Folkert wrote:
 On Tue, 2007-04-17 at 05:15 +0530, Masatran, R. Deepak wrote:
 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?
 
 apt-get install sudo
 
 Then read the docs (man sudo) or goto the sudo website.
 
 http://www.gratisoft.us/sudo/
 

If you find the man page a bit daunting, have a look at the description and
template sudoers file on the NewbieDOC wiki:
http://newbiedoc.berlios.de/wiki/How_to_configure_Sudo_to_run_programs_as_a_different_user



-- 
Chris.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-17 Thread Sven Arvidsson
On Tue, 2007-04-17 at 05:15 +0530, Masatran, R. Deepak wrote:
 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?

I guess you want to change the behaviour of gksu? Do,

gconftool-2 --type bool --set /apps/gksu/sudo-mode true

Or the same action with gconf-editor.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22


signature.asc
Description: This is a digitally signed message part


Re: Sudo instead of SU

2007-04-17 Thread Michael Pobega
On Tue, Apr 17, 2007 at 12:42:48PM +0200, Sven Arvidsson wrote:
 On Tue, 2007-04-17 at 05:15 +0530, Masatran, R. Deepak wrote:
  How can I replace SU with Sudo (like Ubuntu), in Gnome and other
  applications?
 
 I guess you want to change the behaviour of gksu? Do,
 
 gconftool-2 --type bool --set /apps/gksu/sudo-mode true
 
 Or the same action with gconf-editor.

This has never worked too well for me, just a note. Last time I tried
it a lot of applications didn't want to work. Do it at your own risk.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-17 Thread Sven Arvidsson
On Tue, 2007-04-17 at 06:49 -0400, Michael Pobega wrote:
 On Tue, Apr 17, 2007 at 12:42:48PM +0200, Sven Arvidsson wrote:
  I guess you want to change the behaviour of gksu? Do,
  
  gconftool-2 --type bool --set /apps/gksu/sudo-mode true
  
  Or the same action with gconf-editor.
 
 This has never worked too well for me, just a note. Last time I tried
 it a lot of applications didn't want to work. Do it at your own risk.

You do need to configure sudo first of course. I have been running with
gksu in sudo mode for quite a long time, and haven't had any problems.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22


signature.asc
Description: This is a digitally signed message part


Re: Sudo instead of SU

2007-04-17 Thread Michael Pobega
On Tue, Apr 17, 2007 at 12:56:13PM +0200, Sven Arvidsson wrote:
 On Tue, 2007-04-17 at 06:49 -0400, Michael Pobega wrote:
  On Tue, Apr 17, 2007 at 12:42:48PM +0200, Sven Arvidsson wrote:
   I guess you want to change the behaviour of gksu? Do,
   
   gconftool-2 --type bool --set /apps/gksu/sudo-mode true
   
   Or the same action with gconf-editor.
  
  This has never worked too well for me, just a note. Last time I tried
  it a lot of applications didn't want to work. Do it at your own risk.
 
 You do need to configure sudo first of course. I have been running with
 gksu in sudo mode for quite a long time, and haven't had any problems.

I have sudo configured (I always use it in preference to su), but like
I said last time I tried to use only sudo it didn't want to work. Some
of the programs just wouldn't start, and complained that I need to be
root to use them.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-17 Thread Atis

On 4/17/07, Michael Pobega [EMAIL PROTECTED] wrote:

I have sudo configured (I always use it in preference to su), but like
I said last time I tried to use only sudo it didn't want to work. Some
of the programs just wouldn't start, and complained that I need to be
root to use them.


maybe `sudo -H command` helps?

Regards,
Atis


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Sudo instead of SU

2007-04-17 Thread Joe Hart
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael Pobega wrote:
 On Tue, Apr 17, 2007 at 12:56:13PM +0200, Sven Arvidsson wrote:
 On Tue, 2007-04-17 at 06:49 -0400, Michael Pobega wrote:
 On Tue, Apr 17, 2007 at 12:42:48PM +0200, Sven Arvidsson wrote:
 I guess you want to change the behaviour of gksu? Do,
 
 gconftool-2 --type bool --set /apps/gksu/sudo-mode true
 
 Or the same action with gconf-editor.
 This has never worked too well for me, just a note. Last time I tried
 it a lot of applications didn't want to work. Do it at your own risk.
 You do need to configure sudo first of course. I have been running with
 gksu in sudo mode for quite a long time, and haven't had any problems.
 
 I have sudo configured (I always use it in preference to su), but like
 I said last time I tried to use only sudo it didn't want to work. Some
 of the programs just wouldn't start, and complained that I need to be
 root to use them.
 
 

In that case, you can do a sudo -i and gain a root prompt.

Personally I only have sudo set up to do some things, and getting a root
prompt is definitely not one of them.  But then again, I didn't set up
sudoers to do ALL:ALL like some people do. (uh, ubuntu comes to mind)


Cris Lale's site:
http://newbiedoc.berlios.de/wiki/How_to_configure_Sudo_to_run_programs_as_a_different_user

explains well how to do a good setup.  He already mentioned that link in
this thread, but since it's such a good tutorial, I mention it again.

Joe

- --
Registerd Linux user #443289 at http://counter.li.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJMIQiXBCVWpc5J4RAom8AKCLuRBqxoCeYEkPOstHwQ/gbXuZtgCfZ4OS
VcK7bbspI/jBcHPfRqpVGpc=
=pfEo
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Sudo instead of SU

2007-04-17 Thread Joey Hess
Sven Arvidsson wrote:
 On Tue, 2007-04-17 at 05:15 +0530, Masatran, R. Deepak wrote:
  How can I replace SU with Sudo (like Ubuntu), in Gnome and other
  applications?
 
 I guess you want to change the behaviour of gksu? Do,
 
 gconftool-2 --type bool --set /apps/gksu/sudo-mode true
 
 Or the same action with gconf-editor.

FWIW, the way that d-i accomplishes this, if the user choses to set up
system w/o a password for root (in expert mode) is:

update-alternatives --set libgksu-gconf-defaults \
/usr/share/libgksu/debian/gconf-defaults.libgksu-sudo
update-gconf-defaults

See http://bugs.debian.org/382670 for discussion.

-- 
see shy jo


signature.asc
Description: Digital signature


Re: Sudo instead of SU

2007-04-17 Thread Chris Lale
Joe Hart wrote:
[...]
 
 Cris Lale's site:
 http://newbiedoc.berlios.de/wiki/How_to_configure_Sudo_to_run_programs_as_a_different_user
 
 explains well how to do a good setup.  He already mentioned that link in
 this thread, but since it's such a good tutorial, I mention it again.

Thanks for the kind comment Joe. :)

-- 
Chris.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Sudo instead of SU

2007-04-16 Thread Masatran, R. Deepak
How can I replace SU with Sudo (like Ubuntu), in Gnome and other
applications?

-- 
Masatran, R. Deepak http://research.iiit.ac.in/~masatran/


pgpqkfEDrJe07.pgp
Description: PGP signature


Re: Sudo instead of SU

2007-04-16 Thread Greg Folkert
On Tue, 2007-04-17 at 05:15 +0530, Masatran, R. Deepak wrote:
 How can I replace SU with Sudo (like Ubuntu), in Gnome and other
 applications?

apt-get install sudo

Then read the docs (man sudo) or goto the sudo website.

http://www.gratisoft.us/sudo/

Cheers.
-- 
greg, [EMAIL PROTECTED]

Novell's Directory Services is a competitive product to Microsoft's
Active Directory in much the same way that the Saturn V is a competitive
product to those dinky little model rockets that kids light off down at
the playfield. -- Thane Walkup


signature.asc
Description: This is a digitally signed message part