Find the answer to your Linux question:
Results 1 to 5 of 5
Okay, I have a few questions (hopefully with simple answers): 1. How can I have a script execute at startup? 2. How can I have someone auto-login? 3. How can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619

    A few (hopefully simple) questions


    Okay, I have a few questions (hopefully with simple answers):

    1. How can I have a script execute at startup?
    2. How can I have someone auto-login?
    3. How can I have it so when you su, it doesn't ask for a password but just auto goes to root?
    4. How can I change the default hostname (from darkstar)?

    By the way, I am using no X, therefore no WM. This all has to apply to the CLI.

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035

    Re: A few (hopefully simple) questions

    Quote Originally Posted by bryansmith
    Okay, I have a few questions (hopefully with simple answers):

    1. How can I have a script execute at startup?
    2. How can I have someone auto-login?
    3. How can I have it so when you su, it doesn't ask for a password but just auto goes to root?
    4. How can I change the default hostname (from darkstar)?

    By the way, I am using no X, therefore no WM. This all has to apply to the CLI.

    Bryan
    1. Place it in /etc/rc.d
    3. For example, to allow users in the wheel group to do this, place this is /etc/pam.d/su:
    Code:
    auth       sufficient   pam_wheel.so use_uid trust
    4. Edit /etc/hostname, and make sure to add a line containing
    Code:
    127.0.0.1 newhostname
    If you want the change to be immediate, use the hostname command.

  3. #3
    Linux User
    Join Date
    Oct 2004
    Location
    Serbia&Montenegro
    Posts
    281
    Cool trick about su, lakerdonald.
    Also, Bryan if you want a script to run on startup, put the script in /etc/rc.d and make it executable. Or put it in rc.local.
    Linux registered user #358842
    Human knowledge belongs to the world.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Thanks for the help.

    One more...how do I have a script run as soon as bash is started? Is this possible?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  6. #5
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Put it in your .bashrc

Posting Permissions

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