how can a normal user behave as root

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishek92
    New Member
    • Jul 2007
    • 9

    how can a normal user behave as root

    I want to know is there any way by which a normal user can temporarily behave as root user..
    This privilege should not be given by root...
    I was asked this question in an interview.. I could not find out
  • archonmagnus
    New Member
    • Jun 2007
    • 113

    #2
    Through the sudo command. If a user tries sudo and isn't on the approved user list (at /etc/sudoers), notifications are sent to the admin.

    Comment

    • Chrisjc
      Contributor
      • Nov 2006
      • 375

      #3
      \Users set with admin "root" privileges... I don’t fully understand the question... as you stating that someone just logged in and has full root??? just no one set it?

      If that was the question I find that hard to believe unless hacked?

      Comment

      • skyy
        New Member
        • May 2007
        • 109

        #4
        Using command - "sudo -u root <command>"

        the allowed user and command are set inside /etc/sudoers

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          But like he said, it was not given by root so we can assume sudo won't work. The only other way would be restarting the computer and getting into single user.

          Comment

          • archonmagnus
            New Member
            • Jun 2007
            • 113

            #6
            Originally posted by abhishek92
            This privilege should not be given by root...
            I took that to mean that root didn't give su access to the user or otherwise grant a privilege escalation. Perhaps the OP could resolve some confusion as to the level of interaction with root?

            Comment

            • Motoma
              Recognized Expert Specialist
              • Jan 2007
              • 3236

              #7
              Originally posted by abhishek92
              I want to know is there any way by which a normal user can temporarily behave as root user..
              This privilege should not be given by root...
              I was asked this question in an interview.. I could not find out
              If a binary or shell script has the setuid bit set, the user which the binary will run as will be the owner of the file.

              Comment

              Working...