Re: Bash-SU Question

2008-09-13 Thread Gabriel Parrondo
El dom, 14-09-2008 a las 12:53 +1000, Alex Samad escribió: > On Sat, Sep 13, 2008 at 04:13:27PM -0600, Telly Williams wrote: > > Hi, > > > > Here's my script: > > > > #!/bin/sh > > > > su -m -c "echo User: $(whoami)" user1 > > isn't this $(whoami) being executed in the original /bin/sh to e

Re: Bash-SU Question

2008-09-13 Thread Telly Williams
>isn't this $(whoami) being executed in the original /bin/sh to executre >it under the su wouldn't you need something like > >\$(whoami) Well, it worked, escaping it like that. Thanks for the reply! Also, sorry about placing this under a previous list message. -- VR ~

Re: Bash-SU Question

2008-09-13 Thread Alex Samad
On Sat, Sep 13, 2008 at 04:13:27PM -0600, Telly Williams wrote: > Hi, > > Here's my script: > > #!/bin/sh > > su -m -c "echo User: $(whoami)" user1 isn't this $(whoami) being executed in the original /bin/sh to executre it under the su wouldn't you need something like \$(whoami) > sle

Re: Bash-SU Question [ DISREGARD ]

2008-09-13 Thread Telly Williams
-- VR ~ TW Email: [EMAIL PROTECTED] "Knowledge Is Power" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Bash-SU Question

2008-09-13 Thread Telly Williams
Hi, Here's my script: #!/bin/sh su -m -c "echo User: $(whoami)" user1 sleep1 user=$(whoami) echo "User: $user" I expect that when I run this as root, it changes to user1, executes the command specified and outputs to STDOUT "User: user1", and then executes the second command

Re: su question

2000-07-08 Thread John Pearson
On Fri, Jul 07, 2000 at 11:22:38PM +0200, [EMAIL PROTECTED] wrote > On Fri, Jul 07, 2000 at 03:14:55PM +0200, tom wrote: > > howdy guys, > > > > This is one of those things that has > > been pestering me. while logged in as a user in x, how can I > > edit files that require su privilages? (like /

Re: su question

2000-07-08 Thread Ethan Benson
On Sat, Jul 08, 2000 at 01:51:49AM -0400, Ben Collins wrote: > > But of course that's why sudo allows you to restrict usage to certain > commands defined in /etc/sudoers. Obviously this limits the compromise > even further. Being able to give certain users access to specific > commands, without gi

Re: su question

2000-07-08 Thread Ben Collins
On Fri, Jul 07, 2000 at 08:55:57PM -0800, Ethan Benson wrote: > On Fri, Jul 07, 2000 at 05:28:54PM -0400, Ben Collins wrote: > > > sudo alleviates the need for this. I suggest using that where you are > > interested in an easier method. Also, sudo requires a password just like > > su, but caches t

Re: su question

2000-07-07 Thread Ethan Benson
On Fri, Jul 07, 2000 at 05:28:54PM -0400, Ben Collins wrote: > sudo alleviates the need for this. I suggest using that where you are > interested in an easier method. Also, sudo requires a password just like > su, but caches that access. This means that you can use sudo again within > like 15 minu

Re: su question

2000-07-07 Thread Ben Collins
On Fri, Jul 07, 2000 at 11:22:38PM +0200, [EMAIL PROTECTED] wrote: > On Fri, Jul 07, 2000 at 03:14:55PM +0200, tom wrote: > > howdy guys, > > > > This is one of those things that has > > been pestering me. while logged in as a user in x, how can I > > edit files that require su privilages? (like

Re: su question

2000-07-07 Thread gianluca
On Fri, Jul 07, 2000 at 03:14:55PM +0200, tom wrote: > howdy guys, > > This is one of those things that has > been pestering me. while logged in as a user in x, how can I > edit files that require su privilages? (like /etc/fstab). I > usually su from eterm and "jed filename". can I su from within

RE: su question

2000-07-07 Thread Bruce Sass
On Fri, 7 Jul 2000, Bruce Sass wrote: > How much would this break? > > chown -R operator /etc/* ; adduser someluckyguy operator Doh! Forget it, please :). I guess one cup'o'coffee ain't enough. - Bruce

RE: su question

2000-07-07 Thread Bruce Sass
k? chown -R operator /etc/* ; adduser someluckyguy operator - Bruce -- > -Original Message- > From: tom [mailto:[EMAIL PROTECTED] > Sent: Friday, 07 July, 2000 7:15 AM > To: debian-user > Subject: su question > > > howdy guys, > > This is one o

RE: su question

2000-07-07 Thread Walter Williams
-Original Message- From: tom [mailto:[EMAIL PROTECTED] Sent: Friday, 07 July, 2000 7:15 AM To: debian-user Subject: su question howdy guys, This is one of those things that has been pestering me. while logged in as a user in x, how can I edit files that require su privileges? (like /etc/fs

Re: su question

2000-07-07 Thread Ron Rademaker
Perhaps sudo can help you, with sudo you just do: sudo and it's executed with root privileges (after ofcourse you have given the user permission to use sudo). Ron Rademaker On Fri, 7 Jul 2000, tom wrote: > howdy guys, > > This is one of those things that has > been pestering me. while logged

su question

2000-07-07 Thread tom
howdy guys, This is one of those things that has been pestering me. while logged in as a user in x, how can I edit files that require su privilages? (like /etc/fstab). I usually su from eterm and "jed filename". can I su from within emacs? nedit? thanks! -tom -- -tom