PDA

View Full Version : Successful HDD install, root access?



wishkah
08-09-2005, 06:14 PM
I recently installed Knoppix onto one of my machines. It was successful. Im really new to linux im curious about root privileges. I realized that in /etc/apt/sources.lst there are specific updates. I wanted to add the deb and deb-src for a Wine HQ install. When i open the file in kedit and add the lines that works great, but when i try to save it a message pops up and tells me either i dont have the privileges or i dont have enough space. Space isn't the issue.

Basically im trying to ask, is there a way to give yourself full root access using the GUI without using the shell?
Or, if there isnt a way, how do i open source.lst in a text editor from the shell once im logged in as root?

I did try typing "nano /etc/apt/sources.lst" but it doesnt recognize the command.
Is there a shell command for kedit? or any other text editor?

maxIT
08-09-2005, 08:02 PM
Basically im trying to ask, is there a way to give yourself full root access using the GUI without using the shell?
Or, if there isnt a way, how do i open source.lst in a text editor from the shell once im logged in as root?

I did try typing "nano /etc/apt/sources.lst" but it doesnt recognize the command.
Is there a shell command for kedit? or any other text editor?


As I know 'nano' isn't isntalled in knoppix. You can type another gui editor instead of nano in shell with root privileges, or a full shell editor as "vi /etc/apt/sources.lst", but this is very tricky for newbies.
I'm not sure and maybe I'm sayng a stupid thing, but while knoppix is based on debian, seems to me that last debian releases (and so last knoppix releases) don't make possible to acess at gui environment with root account.

UnderScore
08-09-2005, 08:45 PM
You don't have to use a shell for all tasks but you most likely so have to run 1 command.

From a non-root user account, edit a text file with KDE's Kate as root:
kdesu kate /path/to/file.txt

From a non-root user account, run KDE's Control Center as root:
kdesu kcontrol

Like su or sudo, it will ask for the root user password and then will run the command that you specified. you could create a task bar app link or icon that runs the command 'kdesu kate /path/to/file.txt' so that in the future you do not need to manually type it all out but instead just click an icon. I am not 100% positive but I do not see a reason why this wouldn't work.

markpreston
08-09-2005, 09:47 PM
The simplest way to gain a root gui is to log out as a normal user, then log in as root. If there are no other users that have a gui
then root will obtain a gui. It's not as convenient as it used to be.

http://www.knoppix.net/forum/viewtopic.php?t=17347

http://www.knoppix.net/forum/viewtopic.php?t=18459

should help explain.
Regards,
Mark

UnderScore
08-09-2005, 10:04 PM
Ummm Mark you might be incorrect. It is not necessary to login and get a complete KDE desktop session to run application as root. From that first link:
If you try to login to KDE as root it won't work. You should never login to KDE as root as it's a security risk.
To do root stuff you can use:
- sudo
- su
- sux
- kdesu kedit (or some other app)

From that second link, you mentioned that you can't login as root. Its a function of KDM since it locks root from loggin in. So follow echo2geek's advice at http://www.knoppix.net/forum/viewtopic.php?p=80355#80355

This is why I suggested to run kdesu. You can try it yourself. Boot knoppix from CD. Open a konsole command prompt window. Since root user password is scrambled/locked by default, use the command 'su -' to become root user. Run 'passwd' & set a new password for root. Run 'exit' to escape from root user. Now run kdesu to run an application: kdesu konqueror /path/to/folder/
It will popup a dialog & ask you for the root password. Once you give it the root password, konqueror will run as root and will have full authority as root.

markpreston
08-09-2005, 10:46 PM
Hi UnderScore,
I'm at a bit of a disadvantage discussing this topic at present because I recently uninstalled my Knoppix 3.8.1 installation and currently have no relevant Knoppix hard-disk installation to refer to. However, I did solve the problem I had which was discussed at

http://www.knoppix.net/forum/viewtopic.php?t=18459

and from memory, if you are logged in with just a console login you can su into root, startx and gain a full root graphical login, which is what
wishkah asked for. There are other ways as well, but as Markus wrote there are security risks to be considered.
Regards,
Mark

wishkah
08-10-2005, 04:46 AM
Thanks for the help, ill test out getting root access in the GUI and let you know. So far i just used mcedit and then ran apt-get install wine and it worked ok..