Find the answer to your Linux question:
Results 1 to 3 of 3
Hey folks, Is there any way to make it so that when a normal user who is part of the sudoers file runs sudo su And logs in with his ...
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4

    [SOLVED] sudo problem

    Hey folks,

    Is there any way to make it so that when a normal user who is part of the sudoers file runs

    sudo su

    And logs in with his password, the shell is set to root? I have some relatively inexperienced (moreso than myself) users who will be SSH'ing in and doing this, and the fact that they'll google for adding users and then realize that they can't do "useradd" without the /usr/sbin in front of it is going to confuse the heck out of them.

    Any way to remedy this?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Put a trailing dash after su as in sudo su - which will run a login shell, hence getting root's environment. Without the dash, they will continue to have their regular user environment.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4
    Quote Originally Posted by Rubberman View Post
    Put a trailing dash after su as in sudo su - which will run a login shell, hence getting root's environment. Without the dash, they will continue to have their regular user environment.
    Thanks, I knew it would be something simple like that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...