Find the answer to your Linux question:
Results 1 to 10 of 10
hi, i am using RHEL 5 client with Gnome Desktop. i have a few questions 1)Is it possible for the Root to have auto login? 2)If yes please could any ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    21

    [SOLVED] auto login for Root in Gnome!!

    hi,
    i am using RHEL 5 client with Gnome Desktop.

    i have a few questions
    1)Is it possible for the Root to have auto login?
    2)If yes please could any one Guide me.


    3)If Not, i want to use /(slash)("root@localhost" instead of "user@localhost") directory directly with out entering the root password in the created user.

    Thanks in advance.
    Last edited by linuxnewbie435; 03-11-2010 at 06:28 AM. Reason: {SOLVED}

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    1. Yes, but possibly not using GDM.

    2. Probably not. At least my opinion is, given the risks associated with running as root, if you can't find this information on your own, you probably shouldn't be doing it. I found the answer to 3 in about 2 minutes of googling.

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    21
    Can i get the answer for my 3rd question.

    atleast i need a user with root privileges.

    for that i was tweaking the sudoers file but dont know whether i will get the required results.

    My requirement is :

    actually i was running few application in the Gnome startup which are in '/'directory with some .sh scripts logged as root.
    As the root is not having the direct login in Gnome Desktop now i am trying the above method.

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    actually i was running few application in the Gnome startup which are in '/'directory with some .sh scripts logged as root.
    As the root is not having the direct login in Gnome Desktop now i am trying the above method.
    Ah, see, now that's a whole different thing. Start from the correct premise that you absolutely do not have to log in to GNOME as root, nor autologin as root to do anything you might need to do.

    However, you're being very unclear about what exactly you need to have happen.

    Generally, if you have a script that you need to run when the system boots, you can put it in /etc/rc.d/rc.local.

  5. #5
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Can i get the answer for my 3rd question.
    *sigh* First hit on google.

  6. #6
    Just Joined!
    Join Date
    Mar 2010
    Posts
    21
    it was a GUI app . so if i place at rc.d scripts.
    it gives me the error because the X server(GUI) was not started.

    so wht i did is i kept them in Gnome session (it was the case when i was using root user ).

    ok leave all this ..

    can i get the answers for me questions please.??

  7. #7
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    You can run this command from the terminal
    Code:
    gksu /path/to/scriptname.sh
    ...replacing the path/name with the appropriate information.

  8. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    21
    Thank you alll ..
    I got my work done..

  9. #9
    Just Joined!
    Join Date
    Mar 2010
    Posts
    5

    Full answer

    I read so very many posts online about this topic as I wanted it too. I got very sick of everyone saying it can't be done, that it is a bad idea blah blah blah. The fact is this questions is asked OFTEN and met with the same pat answer. Guess what... you do NOT know what is best for me, just answer the dang question.
    I know the risks, I know the issues but if you are anything like me you can do just as much damage with the su or sudo command from a regular user than from root.
    I want this feature because I use my machine not as a desktop user but as root. I do not log in to surf, I do not log in to listen to music, I have other machines for that. Why Gnome? I like to work in a more familiar space with a terminal window opoen, not to mention in the GUI I can make the terminal window bigger, open multiple and copy/paste between and if I need to look something up I can jump on firefox. That is why I like other have desperatly searched for this answer.

    For those who want it here is the solution...

    in /etc/inittab make sure the following is correct

    id:3:initdefault:

    you don't want runlevel 5 here.

    at the very last line of your /etc/rc.local add the following line


    su - -c "/bin/bash startx" root

    this will su with a login command, run the command startx and login as root.

    here is the disclaimer, you can do damage as root. But since you are looking for this like I did you already know that and I dont need to tell you, just dont want the flood of "your stupid" posts to folow.

    Hope this helps

  10. #10
    Just Joined!
    Join Date
    Jan 2011
    Posts
    1

    THANK YOU winchester169

    for once this question was answered without all the you should not do this stuff , you have save me alot of time for this stand alone pice of hardware

    and it works great



    Quote Originally Posted by winchester169 View Post
    I read so very many posts online about this topic as I wanted it too. I got very sick of everyone saying it can't be done, that it is a bad idea blah blah blah. The fact is this questions is asked OFTEN and met with the same pat answer. Guess what... you do NOT know what is best for me, just answer the dang question.
    I know the risks, I know the issues but if you are anything like me you can do just as much damage with the su or sudo command from a regular user than from root.
    I want this feature because I use my machine not as a desktop user but as root. I do not log in to surf, I do not log in to listen to music, I have other machines for that. Why Gnome? I like to work in a more familiar space with a terminal window opoen, not to mention in the GUI I can make the terminal window bigger, open multiple and copy/paste between and if I need to look something up I can jump on firefox. That is why I like other have desperatly searched for this answer.

    For those who want it here is the solution...

    in /etc/inittab make sure the following is correct

    id:3:initdefault:

    you don't want runlevel 5 here.

    at the very last line of your /etc/rc.local add the following line


    su - -c "/bin/bash startx" root

    this will su with a login command, run the command startx and login as root.

    here is the disclaimer, you can do damage as root. But since you are looking for this like I did you already know that and I dont need to tell you, just dont want the flood of "your stupid" posts to folow.

    Hope this helps

Posting Permissions

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