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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
01-23-2011, 06:27 PM
|
#1
|
|
Member
Registered: Jan 2011
Posts: 52
Rep:
|
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.
|
|
|
|
01-23-2011, 06:30 PM
|
#2
|
|
Senior Member
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,296
|
You can use the Alt+f buttons.
|
|
|
|
01-23-2011, 06:31 PM
|
#3
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,113
|
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.
|
01-23-2011, 06:38 PM
|
#4
|
|
Member
Registered: Jan 2011
Posts: 52
Original Poster
Rep:
|
Quote:
Originally Posted by EDDY1
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.
|
|
|
|
01-23-2011, 06:48 PM
|
#5
|
|
Senior Member
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,296
|
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.
|
|
|
|
01-23-2011, 06:54 PM
|
#6
|
|
Member
Registered: Jan 2011
Posts: 52
Original Poster
Rep:
|
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.
|
|
|
|
01-23-2011, 07:02 PM
|
#7
|
|
Senior Member
Registered: Jan 2006
Posts: 4,362
Rep: 
|
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.
|
01-23-2011, 07:02 PM
|
#8
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,522
|
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.
|
01-23-2011, 07:11 PM
|
#9
|
|
Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian
Posts: 5,485
|
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.
|
01-23-2011, 07:44 PM
|
#10
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,261
|
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.
|
01-24-2011, 12:27 AM
|
#11
|
|
Member
Registered: Sep 2004
Distribution: CentOS 6.2
Posts: 133
Rep:
|
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.
|
01-24-2011, 12:44 AM
|
#12
|
|
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
Rep:
|
If the root account is locked, you can unlock it by:
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.
|
01-24-2011, 03:27 AM
|
#13
|
|
Senior Member
Registered: Dec 2008
Location: Gorizia, Italy
Distribution: Debian Testing Amd64
Posts: 3,251
Rep: 
|
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.
|
01-24-2011, 08:02 AM
|
#14
|
|
Member
Registered: Jan 2011
Posts: 52
Original Poster
Rep:
|
Quote:
Originally Posted by TobiSGD
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.
|
|
|
|
01-24-2011, 08:07 AM
|
#15
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,522
|
Did you get any error-messages?
Please post the output of
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:29 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|