LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2011, 06:27 PM   #1
LittlePenguin
Member
 
Registered: Jan 2011
Posts: 52

Rep: Reputation: 3
Making my GUI user a root user.


Hi.

Im using Debian Squeeze, and I need to give to my gui user (the gnome user I think its called) root permision, I mean, I want to explore, read and write anything I want using my GUI user, how can I do it?.

Thx.
 
Old 01-23-2011, 06:30 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You can use the Alt+f buttons.
 
Old 01-23-2011, 06:31 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
It's a very bad idea. You shouldn't log in as root (or anything with such privileges) in GUI (if that's what you want to do)

Why do you want to do it, anyway?
 
1 members found this post helpful.
Old 01-23-2011, 06:38 PM   #4
LittlePenguin
Member
 
Registered: Jan 2011
Posts: 52

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by EDDY1 View Post
You can use the Alt+f buttons.
What is that?

@sycamorex cuz Im the only one using this pc and cuz I need to run Aptana (an IDE) and to be able to modify /var/www to make web tests, right now I cant.
 
Old 01-23-2011, 06:48 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Easier to use su or sudo
Using alt=F buttons only give a terminal similar to the terminal that you open.

Last edited by EDDY1; 01-23-2011 at 06:50 PM.
 
Old 01-23-2011, 06:54 PM   #6
LittlePenguin
Member
 
Registered: Jan 2011
Posts: 52

Original Poster
Rep: Reputation: 3
You dont get it...

If I use su or sudo, Im making my TERMINAL user a root user, but my GUI user (the one that clicks everything :P ) is still having restrictions.
 
Old 01-23-2011, 07:02 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
You seem to be missing the point. You su - in terminal and start the app with root privileges(all the advantages without so much risk).

For instance:

Quote:
[fred@localhost ~]$ su -
Password:
[root@localhost ~]# gedit

Starts and instance of gedit with root priveges and path.
 
1 members found this post helpful.
Old 01-23-2011, 07:02 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Make a new group, I will call it web. Then change the owner of /var/www to root:web. After that add your user to the new group. You should be able to modify the /var/www-folder now, without being root.
In short:
Code:
addgroup web
chown -R root:web /var/www
usermod -a -G web yourusername
 
1 members found this post helpful.
Old 01-23-2011, 07:11 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,314
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
You should not give your user logon root privileges, but you can enable a root logon to the GUI.

This works on Lenny. I suspect that it will work on Sid and Squeeze also, though I haven't used them.

On the Debian log in screen, go to Actions-->Configure the Login Manager and click OK.

Debian will ask for the root password. Enter it.

When the dialog box appears, click the "Security" tab, then select "Allow local administrator logon."

Editorial:

Ubuntu has convinced a lot of folks that logging in as root is inherently a bad thing.

It's not.

Logging in as root and then doing stupid stuff is inherently a bad thing. Stupid stuff=bad thing.

Root can find the GUI more convenient than the command line, just as user does.
 
2 members found this post helpful.
Old 01-23-2011, 07:44 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Post #8 is a good solution.
Don't hack around in root unless you're changing system cfg files; NOT for web pages and the like.
 
1 members found this post helpful.
Old 01-24-2011, 12:27 AM   #11
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
Most definately do it as per post #8. Most distros have root login via the graphical login disabled by default as it is a risk to do so.

In the case of your web folder, another reason to have it run and be edited as a seperate user, is that if it will be facing the internet, then it will be safer by possible crackers only being limited to those directories rather than the whole system.

Another problem that you will most likely run into seeing that you are using an IDE is with permissions when files are executed by the www daemon and then having to write data into a root owned file. This will not be allowed and as a result your applications may have issues running. So as per post #8 quite a few problems are solved in a single easy step.

All the best with your developments.
 
1 members found this post helpful.
Old 01-24-2011, 12:44 AM   #12
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
If the root account is locked, you can unlock it by:

Code:
sudo passwd
This will allow you to enter a new password for the root account that will allow you to log in as root without a problem.
 
1 members found this post helpful.
Old 01-24-2011, 03:27 AM   #13
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
No need to log into your gui as root. You can use gksu and/or gksudo to run specific applications while logged in as a normal user.
ciao,
jdk
 
1 members found this post helpful.
Old 01-24-2011, 08:02 AM   #14
LittlePenguin
Member
 
Registered: Jan 2011
Posts: 52

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by TobiSGD View Post
Make a new group, I will call it web. Then change the owner of /var/www to root:web. After that add your user to the new group. You should be able to modify the /var/www-folder now, without being root.
In short:
Code:
addgroup web
chown -R root:web /var/www
usermod -a -G web yourusername
It didnt work, Im stil having read only permission on that folder.

Edit.: I went to the permisions tab under properties and I can see the group "web" but it says: "Access files", and above that there is root and it says: "Create and delete files", but Im not in that group,and web group cant create or delete files.

@frankbell I have no such option in Squeeze.

Last edited by LittlePenguin; 01-24-2011 at 08:08 AM.
 
Old 01-24-2011, 08:07 AM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Did you get any error-messages?
Please post the output of
Code:
ls -l /var/www
 
1 members found this post helpful.
  


Reply



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
root user is not logging in gui singh_chitranjan Linux - Server 2 12-13-2010 05:43 AM
Couldn't GUI login as any other user than root rugdude SUSE / openSUSE 3 03-19-2007 04:11 AM
no gui for normal/root user.. aaru_ali SUSE / openSUSE 0 10-24-2004 12:37 AM
making a psudo-root user babyphil Linux - General 1 08-17-2004 11:34 AM
Loggin into my GUI as root user MackH Mandriva 6 06-08-2004 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:55 PM.

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
Open Source Consulting | Domain Registration