LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-15-2003, 02:00 PM   #1
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Rep: Reputation: 30
Can you log in as root automatically?


I mean,from boot up,can you boot straight in as root without having to enter 'root' and a password each time?
 
Old 04-15-2003, 02:54 PM   #2
david_reno
LQ Newbie
 
Registered: Apr 2003
Posts: 21

Rep: Reputation: 16
More info please. Why do you want to do this? Do you want something like MS-Windows has that frees you from the effort of typing a password everytime? If so, you should pursue automatic login of a user account (note: I don't know if that's possible).

Are you thinking of loging in to a window manager (i.e. X windows), or just a psuedo terminal session?
 
Old 04-15-2003, 02:59 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Yes but it's dangerous so don't!
 
Old 04-15-2003, 03:00 PM   #4
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
Yes, but that defeats the purpose of Linux's security. It's same as giving the keys to your house and car to everybody.

If you're so inclined to do it, go to KDE, Control Center, Login...
 
Old 04-15-2003, 03:01 PM   #5
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
You should not be logging in as root each time. Most distros force you to make a seperate 'everyday use' account. You'll only complain when you screw something up while as root.
Use the su command when you need root access.
 
Old 04-15-2003, 06:05 PM   #6
Linus VanPelt
Member
 
Registered: Mar 2003
Location: Manchester, NH, USA
Distribution: SuSE 9.1
Posts: 73

Rep: Reputation: 15
I know it is a pain when you are doing a lot of software installing, but you should never log in directly as root. Always su or run an X-Windows program that requires the root password in order to execute.

Logging in as root, or staying in root all the time, is extremely dangerous.

Oh, and don't make your root password the same as your user account password.
 
Old 04-15-2003, 06:25 PM   #7
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
ok,
I've got a big problem here:

I installed RH8 about 3 weeks ago,and every now and then, the stuff I tried to install,asked me to be root.So i figured I might as well stay root all the time.

Why is it dangerous to do so?


Ok,on to my problem:
II just created a user account and I've found that the programs I've installed as root don't work for the user account
What's more,the internet connection i spent 2 weeks trying to get to work (PPP over ATM ADSL modem) doesn't work from the user account.

Is it the case that anything I did as root won't work for a user? Am I going to have to go back and re-do everything I did as root and re-do it for the new user account?
 
Old 04-15-2003, 06:34 PM   #8
EvilTwinSkippy
Member
 
Registered: Mar 2003
Location: Philadelphia, PA
Distribution: RedHat, Gentoo
Posts: 51

Rep: Reputation: 15
Use Single User Mode

At startup invoke single user mode.

From lilo: add "single" to your "linux" option.

From grub, edit the bootloader for your linux installation, and add "single" to the end of the line that has your kernel statement. (Follow the on-screen instructions.)

I had the same problem a while back with a dialup server.

Failing that, light up the RedHat installer, and use rescue mode. Use the option to mount your system under /mnt/sysimage.

When you get to the prompt:
chroot /mnt/sysimage
passwd root

QED
 
Old 04-15-2003, 07:23 PM   #9
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
Quote:
From grub, edit the bootloader for your linux installation, and add "single" to the end of the line that has your kernel statement.
Can you tell me exactly how it should look.
Should i just have :

title Red Hat Linux (2.4.20)
root (hd0,1)
kernel /boot/vmlinuz-2.4.20 ro root=LABEL=/ hda=ide-scsi/single
initrd /boot/initrd-2.4.20.img
, in grub.config ???


(here,I added '/single' to the end of the kernel line)
Thx
Ludwig

Last edited by ludwig W; 04-15-2003 at 07:33 PM.
 
Old 04-15-2003, 08:51 PM   #10
EvilTwinSkippy
Member
 
Registered: Mar 2003
Location: Philadelphia, PA
Distribution: RedHat, Gentoo
Posts: 51

Rep: Reputation: 15
Quote:
Originally posted by ludwig W
Can you tell me exactly how it should look.
Should i just have :

title Red Hat Linux (2.4.20)
root (hd0,1)
kernel /boot/vmlinuz-2.4.20 ro root=LABEL=/ hda=ide-scsi/single
initrd /boot/initrd-2.4.20.img
, in grub.config ???


(here,I added '/single' to the end of the kernel line)
Thx
Ludwig

kernel /boot/vmlinuz-2.4.20 ro root=LABEL=/ hda=ide-scsi single

(Note no slash)
 
Old 04-16-2003, 03:00 AM   #11
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
thx mate.I'll give it a go.

One thing:
can you tell me exactly what this does

Does it enable a created user profile to access things only root could before?


sorry,I'm a bit confused.

cheers
Ludwig
 
Old 04-16-2003, 07:07 AM   #12
EvilTwinSkippy
Member
 
Registered: Mar 2003
Location: Philadelphia, PA
Distribution: RedHat, Gentoo
Posts: 51

Rep: Reputation: 15
How Single Mode Works

SINGLE is actually a cue for the system to start up in runlevel 1, which bypasses all services and stops after mounting the file systems.

This is particularly useful in cases where one of your daemons is crashing the computer on startup, or you need to do some SERIOUS vodoo on the file system.

On public machines I will usually put a password on the grub loader. I work at a science museum. Kids are constantly finding new ways of breaking things. That and no power of destruction compares to a bored teenager.
 
Old 04-16-2003, 07:10 AM   #13
EvilTwinSkippy
Member
 
Registered: Mar 2003
Location: Philadelphia, PA
Distribution: RedHat, Gentoo
Posts: 51

Rep: Reputation: 15
I looked at my last post an realized I never actually answered you question.

You are actually running as root in single mode. INIT (the master of all processes) startups up BASH instead of the normal login process. You are operating as if you had logged in as root, and had turned off (or more accurately never started) all of the processes in /etc/init.d.

I generally log into single user mode long enough to reset the root password and then reboot.
 
Old 04-16-2003, 12:50 PM   #14
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
Ok,
I'm getting a bit lost here.

My problem is that after setting up my Linux install as root all the time,when I got sick of typing out passwords and user name at each boot, I created a user account.Now, with this user account,I can't run or access most of the stuff I've set up whilst I was root.

Will this 'single' thing fix that or do I really have to start all over again?
You say
Quote:
SINGLE is actually a cue for the system to start up in runlevel 1, which bypasses all services and stops after mounting the file systems
Why would I want to do that?I mean, stopping all services is not a good thing,right? I would have thought I would want services running,would I not?

Sorry,but I've lost the thread of what you are saying or suggesting.

Ludwig

Last edited by ludwig W; 04-16-2003 at 12:51 PM.
 
Old 04-16-2003, 01:36 PM   #15
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I have no idea what "EvilTwinSkippy" is talking about. You only need to boot into single user mode for trouble shooting systme problems and changing the the root password if you forget it.

To answer you other question - It is dangerous to login as root because the root account has permissions to delete system files. For instance on windows 98 any user could login (without any password except bios) and delete C:\autoexec.bat - this would stop the system booting. In linux deleteing system files can only be done by root as only root is given permission to modify the files.

As for you problem with not being able to run programs you have installed - If they are system configuration programs you probably do need to run them as root (again for security). If it is a text editor or web browser etc then it is probably a permssion problem.

There are three types of permissions - read, write, execute. There are also three types of user - owner, group and other. Other is everyone and so most programs are set so that only root can read write and execute but other (everyone) can execute. eg
chown root FILE
chgrp root FILE
chmod 775 FILE

Look at "man chown", "man chgrp" and "man chmod" for more information.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New SQUID user: How to clear the "access.log" and "store.log" automatically? yuzuohong Linux - Networking 2 12-02-2006 06:37 AM
automatically log in TranceDude Fedora 14 08-13-2005 01:03 PM
Log in as root automatically, possible? rand0mh3ro Linux - General 16 12-01-2004 12:41 AM
Log in a user Automatically Swampy Debian 2 10-09-2004 03:02 AM
Samba: Domain logons automatically log off apocow Linux - Networking 0 08-29-2003 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration