Find the answer to your Linux question:
Results 1 to 4 of 4
Anyone know if it is possible to create an alias that calls a script that will SU to a different ID and log me in. Currently I have to log ...
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    1

    Login

    Anyone know if it is possible to create an alias that calls a script that will SU to a different ID and log me in.

    Currently I have to log in using my ID and the SU to an administrator ID. Just kind of a pain to do all the time.

  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
    Usually, a user that needs root privileges is given that capability with the /etc/sudoers file, so they can run a command prefixed with "sudo" to run the command as root.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined! sam619's Avatar
    Join Date
    Nov 2009
    Posts
    16
    Quote Originally Posted by snturner View Post
    Anyone know if it is possible to create an alias that calls a script that will SU to a different ID and log me in.

    Currently I have to log in using my ID and the SU to an administrator ID. Just kind of a pain to do all the time.
    use visudo to edit the sudoers file

  4. #4
    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
    Doing this (auto login as sudo user) is a VERY BIG security hole, and will compromise your system security. It is NOT recommended. Requiring user-input confirmation via a password is advisable. That said, I violate this maxim myself, by allowing myself admin/root privileges on my workstation with a simple "sudo su" command...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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