vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| On Tue, 15 Feb 2005 18:53:15 +0100, A L Meyers wrote: > As sudo has the inconvenience of no root path, would prefer being able > to do su - in a xterm. How can one get the X authorisation of the open > user account when su'ing in a xterm, please? Simplest way is to *not* use "su -" but only "su". |
| |||
| Dave Uhring wrote: > On Tue, 15 Feb 2005 18:53:15 +0100, A L Meyers wrote: > > >>As sudo has the inconvenience of no root path, would prefer being able >>to do su - in a xterm. How can one get the X authorisation of the open >>user account when su'ing in a xterm, please? > > > Simplest way is to *not* use "su -" but only "su". > But then one hasn't a root path, just like using sudo, correct? Any way to get the chicken and the egg? Lux |
| |||
| On Tue, 15 Feb 2005 21:20:40 +0100, A L Meyers wrote: > Dave Uhring wrote: >> On Tue, 15 Feb 2005 18:53:15 +0100, A L Meyers wrote: >> >> >>>As sudo has the inconvenience of no root path, would prefer being able >>>to do su - in a xterm. How can one get the X authorisation of the open >>>user account when su'ing in a xterm, please? >> >> >> Simplest way is to *not* use "su -" but only "su". >> > But then one hasn't a root path, just like using sudo, correct? > > Any way to get the chicken and the egg? xauth or, less securely, 'xhost +localhost' and set root's DISPLAY to localhost:0 You can even copy ~/.ICEauthority and ~/.Xauthority to /root. Or give your user root's PATH. But if root's PATH is defined in /root/.cshrc or /root/.bashrc OpenBSD 3.6 (GENERIC) #0: Thu Dec 23 17:29:11 CST 2004 [~]$ su Password: [duhring]# Here root's shell is /bin/bash and as you can see the /root/.bashrc file was sourced. Note the change of prompt. |
| |||
| Dave Uhring <daveuhring@yahoo.com> wrote in message news:<pan.2005.02.15.20.46.55.330554@yahoo.com>... (snip) > > But then one hasn't a root path, just like using sudo, correct? > > > > Any way to get the chicken and the egg? > > xauth > > or, less securely, 'xhost +localhost' and set root's DISPLAY to > localhost:0 > > You can even copy ~/.ICEauthority and ~/.Xauthority to /root. > > Or give your user root's PATH. But if root's PATH is defined in > /root/.cshrc or /root/.bashrc > > OpenBSD 3.6 (GENERIC) #0: Thu Dec 23 17:29:11 CST 2004 > > [~]$ su > Password: > [duhring]# > > Here root's shell is /bin/bash and as you can see the /root/.bashrc file > was sourced. Note the change of prompt. Thanks again. What about defining everyone in the wheel group to have root's path? Where would be the best place and way to do this once and for all, e.g. /etc/login.conf? Lux |
| |||
| On Tue, 15 Feb 2005 23:55:12 -0800, A. L. Meyers wrote: > Thanks again. What about defining everyone in the wheel group to have > root's path? Where would be the best place and way to do this once > and for all, e.g. > /etc/login.conf? Depends on root's shell. Since su sources /root/.bashrc and /root/.cshrc it's a matter of your choice. Nobody outside of the wheel group is going to be able to access either shellrc. Put root's PATH into the appropriate /root/[.bashrc|.cshrc]. On my home nameserver: PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games export PATH There is also no reason that users should not have that PATH. Your problem with root's PATH is a non sequitur. Just because some system administration utility usable only by root is in a user's PATH does not mean that the user can execute that utility. Do you really believe that an ordinary user can execute /sbin/fdisk? |
| ||||
| Dave Uhring <daveuhring@yahoo.com> wrote in news > > You can even copy ~/.ICEauthority and ~/.Xauthority to /root. You don't need to copy the files, set the XAUTHORITY and ICEAUTHORITY environment variables instead (see X(7)) as root can read the files. -- Peter Strömberg (55.6N 13.0E) C2K2 C2K3 ISCCIV02 ISCCIV03 ISCCIV04 |