PDA

View Full Version : Run as root



RubenK
10-08-2005, 11:34 AM
Hello,

I'm a Windows expert but new to Linux and just installed Knoppix to my HD (debian). For my USB Modem, I needed a driver, and I found and installed one correctly.

The problem is: The driver start program has to be run as root. So this is what I do:

1) at the login screen, I go to the console mode (since I cannot login as root, is this normal? on Win I can do this :))
2) then I start the program (well it's not exactly a driver but a helping program that others have created, still beta etc)
3) everything works well
4) then I go back to the login screen and login
5) then Knoppix hangs by "initializing drivers" or something, but this is probably due to the beta status of the driver

When I run the program from my account, there are insufficient permissions for nice.

My question:
How to run a program as root without logging out etc etc?
or
Can I run the program from my account by setting permissions, and how?

(well you see... I think in Windows!)

BTW the driver is http://eciadsl.flashtux.org/.
But I think my question belongs here since it is mainly about starting a program as root, and thus a Linux related question.

rwcitek
10-08-2005, 08:10 PM
Welcome to Knoppix.net

What version of Knoppix are you using?

My question:
How to run a program as root without logging out etc etc?
or
Can I run the program from my account by setting permissions, and how?
To run a program as root use sudo.

Have you tried asking in the ECIADSL forums: http://eciadsl.sourceforge.net/scripts/forum/

Regards,
- Robert
http://www.cwelug.org

atrick-pay
10-08-2005, 11:34 PM
and to use sudo you have to edit /etc/sudoers
and add a line like this to the end:
yourusernamehere ALL=NOPASSWD: ALL

So login as root to the console (Knoppix doesn't let you Root login to the GUI)
then run visudo and add the line for your user name, save and exit and logout!

rwcitek
10-09-2005, 01:18 AM
and to use sudo you have to edit /etc/sudoers
and add a line like this to the end:
yourusernamehere ALL=NOPASSWD: ALL
This is Knoppix. That should already be there. Or no?

Regards,
- Robert
http://www.cwelug.org

atrick-pay
10-09-2005, 08:08 AM
All the versions of knoppix I've installed to HD have NOT had any entry,
other then root in the sudoers file. (that was the first major thing I had to learn how to do!)

rwcitek
10-09-2005, 04:10 PM
All the versions of knoppix I've installed to HD have NOT had any entry,
other then root in the sudoers file. (that was the first major thing I had to learn how to do!)
Interesting. Did not know that. But then I have only installed Knoppix to the HD once, didn't like it, and removed it. There are better distros for Linux installs.

Out of curiosity, if you install to the HD how are the Virtual Consoles? Do you have to login or are they already open with a root shell? If you boot with the CD, the Virtual Consoles are already open with a root shell.

Regards,
- Robert
http://www.cwelug.org

RubenK
10-09-2005, 06:46 PM
Thank you for the replies... interesting discussion btw about the "sudo" thing :)

Is there a reason why root + GUI is not allowed in Knoppix?

Unfortunately, I can't test the sudo solution right now because I'm not at home, but I'll test it ASAP.

And I think that the question belongs to here, since it is merely about OS commands.

Thank you!

atrick-pay
10-09-2005, 07:48 PM
Running as Root is discouraged for the same reasons running as a limited user on a Win box is incouraged,
Basicly, You can't screw up anything that can't be fixed and neither can any program or even a virus you run
and since it is so easy to run sudo anytime you need to (once it is setup) it is good to play it safe.

After all this is still all a "beta" project! Kind of ..... :)

rwcitek: after you install, the other Virtual Consoles are just waiting for you to login.
I know others have been happier with other distros but I tryied most of them I could
and gave up three years ago, then tryied them all again about a year ago, Knoppix was the only
thing I could get up and running haven't looked back since! :)

RubenK
10-11-2005, 04:03 PM
yes it's right, user can't do "sudo" by default...
"...this incident will be reported..."

damn, unix takes thing seriously :D

rwcitek
10-11-2005, 04:43 PM
yes it's right, user can't do "sudo" by default...
"...this incident will be reported..."

damn, unix takes thing seriously :D
Just to clarify, that is only true with HD installs. If you are running from the LiveCD, the Knoppix user is indeed setup by default to sudo.

Regards,
- Robert
http://www.cwelug.org