Loading ...
Sorry, an error occurred while loading the content.

Re: [gnubies-il] VNC connection as root

Expand Messages
  • Tzafrir Cohen
    ... Both su and su -x should work. Mandrake (and RH/Fedora) uses a special pam module (pam_xauth) for forwarding X authentication tokens over su sessions.
    Message 1 of 7 , Sep 17, 2004
    • 0 Attachment
      On Thu, Sep 16, 2004 at 08:15:02PM -0000, sorin2k4 wrote:
      > I am connecting to my Mandrake10 machine through VNC, and I am
      > using a user that is not root (for security reasons). Though, once I
      > am inside, I sometimes need root privileges to do something.
      > How can this be achieved? I know I can start a terminal and
      > use "su", but can it be done in such a manner, that will allow me to
      > use the X environment?

      Both 'su' and 'su -x' should work.

      Mandrake (and RH/Fedora) uses a special pam module (pam_xauth) for
      forwarding X authentication tokens over su sessions.

      In SuSE you should use 'sux' instead of 'su' if you want X forwarding.

      On other systems you can try something like:

      su -c "env XAUTHORITY=${XAUTHORITY:-${HOME}/.Xauthority} DISPLAY=$DISPLAY $SHELL" -

      This doesn't actually forward the X authentication tokens. It starts a
      new shell that uses the old value for DISPLAY and the user's xauth
      database. Since root can read any file on the system, it can read the
      user's private x authentication database.


      But then again, why not simply use ssh and X forwarding?

      --
      Tzafrir Cohen +---------------------------+
      http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
      mailto:tzafrir@... +---------------------------+
    • Yigal B
      I am using Fedora core 2 and have two questions: 1- How do I ipen graphical window after I do SU in terminal window ? 2- I have two accounts (root and me).
      Message 2 of 7 , Sep 17, 2004
      • 0 Attachment
        I am using Fedora core 2 and have two questions:
        1- How do I ipen graphical window after I do SU in terminal window ?
        2- I have two accounts (root and me). Somehow I cant login into "me"
        account. What can I do to fix that ? I didnt change the password.. and now
        it tells me "authenticatin failed". I have no problem to enter the root's
        account - but I dont think it's a safe idea to do that.



        >From: ILYA EINHORN <ilya9999@...>
        >Reply-To: gnubies-il@yahoogroups.com
        >To: gnubies-il@yahoogroups.com
        >Subject: Re: [gnubies-il] VNC connection as root
        >Date: Fri, 17 Sep 2004 12:14:12 +0300
        >
        >sorin2k4 wrote:
        >
        > > I am connecting to my Mandrake10 machine through VNC, and I am
        > >using a user that is not root (for security reasons). Though, once I
        > >am inside, I sometimes need root privileges to do something.
        > > How can this be achieved? I know I can start a terminal and
        > >use "su", but can it be done in such a manner, that will allow me to
        > >use the X environment?
        > > TIA.
        > >
        > >
        >You have to launch X-applications from command prompt in terminal window
        >after "su".

        _________________________________________________________________
        Tired of spam? Get advanced junk mail protection with MSN 8.
        http://join.msn.com/?page=features/junkmail
      • ILYA EINHORN
        ... 1. For example, after su - password ..... enter gedit . You can edit text files as root 2. Probably, username and password case sensitive - check it
        Message 3 of 7 , Sep 17, 2004
        • 0 Attachment
          Yigal B wrote:

          >I am using Fedora core 2 and have two questions:
          >1- How do I ipen graphical window after I do SU in terminal window ?
          >2- I have two accounts (root and me). Somehow I cant login into "me"
          >account. What can I do to fix that ? I didnt change the password.. and now
          >it tells me "authenticatin failed". I have no problem to enter the root's
          >account - but I dont think it's a safe idea to do that.
          >
          >
          >
          >
          >
          >>From: ILYA EINHORN <ilya9999@...>
          >>Reply-To: gnubies-il@yahoogroups.com
          >>To: gnubies-il@yahoogroups.com
          >>Subject: Re: [gnubies-il] VNC connection as root
          >>Date: Fri, 17 Sep 2004 12:14:12 +0300
          >>
          >>sorin2k4 wrote:
          >>
          >>
          >>
          >>>I am connecting to my Mandrake10 machine through VNC, and I am
          >>>using a user that is not root (for security reasons). Though, once I
          >>>am inside, I sometimes need root privileges to do something.
          >>>How can this be achieved? I know I can start a terminal and
          >>>use "su", but can it be done in such a manner, that will allow me to
          >>>use the X environment?
          >>>TIA.
          >>>
          >>>
          >>>
          >>>
          >>You have to launch X-applications from command prompt in terminal window
          >>after "su".
          >>
          >>
          1. For example, after "su -> password ..... " enter "gedit". You can
          edit text files as root
          2. Probably, username and password case sensitive - check it
        • Tzafrir Cohen
          Folks, please quote properly, and you won t need to overquote. See below: ... I keep this only to demonstrate how to quote. Basically I have nothing to add
          Message 4 of 7 , Sep 17, 2004
          • 0 Attachment
            Folks, please quote properly, and you won't need to overquote.

            See below:

            On Fri, Sep 17, 2004 at 12:52:30PM +0300, ILYA EINHORN wrote:
            > Yigal B wrote:
            >
            > >I am using Fedora core 2 and have two questions:
            > >1- How do I ipen graphical window after I do SU in terminal window ?
            >
            > For example, after "su -> password ..... " enter "gedit". You can
            > edit text files as root

            I keep this only to demonstrate how to quote. Basically I have nothing
            to add here and I could have simply removed this part.

            >
            > >2- I have two accounts (root and me). Somehow I cant login into "me"
            > >account. What can I do to fix that ? I didnt change the password.. and now
            > >it tells me "authenticatin failed". I have no problem to enter the root's
            > >account - but I dont think it's a safe idea to do that.
            > >
            > Probably, username and password case sensitive - check it

            And to make sure you type in the write case, etc., you can try typing
            the password first in the "username" field

            [text below is irrelevant to the current question and was deleted]

            --
            Tzafrir Cohen +---------------------------+
            http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
            mailto:tzafrir@... +---------------------------+
          • ILYA EINHORN
            ... This posting was the FIRST in my life. Excuse me.
            Message 5 of 7 , Sep 17, 2004
            • 0 Attachment
              Tzafrir Cohen wrote:

              >Folks, please quote properly, and you won't need to overquote.
              >
              >
              >
              This posting was the FIRST in my life. Excuse me.
            Your message has been successfully submitted and would be delivered to recipients shortly.