Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: About Users and Groups
PostPosted: Mon Aug 09, 2010 3:51 am 
Offline
Newbie
User avatar

Joined: Mon Aug 09, 2010 3:40 am
Posts: 3
Hello everybody,

I just got a Linode a couple weeks ago, and I am enjoying it, learning a lot of new stuff. I am pretty new to the whole server administration thingy even though I am (relatively) confortable with the Unix command line since I have used Ubuntu for a couple years and OS X for the past two years.

Anyway, here is my question: I am the only user using my linode, and I will (probably) always be. I don't want to keep using the root account, I want to create a new user for myself and add him to the sudoes. But I can google it to help me do that. What I am confused about is the following:

- In which group should I put that group? I think I should probably add him to the admin group but should I also create a new group and put him in it too? How about the staff group? On my mac all my files/folders are assigned to the staff group by default...

- I just tried to install DokuWiki. When I untared the archive, the new dir was assigned to the crontab group automatically (a bit odd if you ask me). So to what group should I assign Web apps/folders/files that I create?

_________________
Blog: http://azizlight.me/
Twitter: http://twitter.com/aziz_light
GitHub: http://github.com/AzizLight/
GitHub Gist: http://gist.github.com/azizlight
Forrst: http://forr.st/-AzizLight


Top
   
 Post subject:
PostPosted: Mon Aug 09, 2010 4:19 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
When you add a linux user it gets it's own group so say the user is called "bob" it will be in the group "bob" no need to add it to another group.

To add it to sudo use the
Code:
visudo
command and add

Code:
bob   ALL=(ALL) ALL

Under the bit where it says root.

As for dokuwiki you're opening a whole can-o-worms on what permissions and groups you should assign web stuff.

Personally I make a user for each of my sites and store the files in /home/<user>/public_html, the files are then owned and grouped by to <user>, with 0644 permissions on files and 0755 on directories (owner writable, everything else readable).

Some people prefer to store them in the /var/www folder, what you don't want to do is allow the files to be writable by the web server, so don't chown www-data or whatever your webserver runs as.


Top
   
 Post subject: Thanks a lot
PostPosted: Mon Aug 09, 2010 4:28 am 
Offline
Newbie
User avatar

Joined: Mon Aug 09, 2010 3:40 am
Posts: 3
I think I am going to do something similar to what you are doing.

All my webapps are stored in /srv/www/{example.com}/public_html/{hypothetical_subdomain_not_counting_www}. What I will do is create a new user and assign the webapps to his group with the appropriate permissions (755 and 644).

Thanks a lot for your answer.

_________________
Blog: http://azizlight.me/

Twitter: http://twitter.com/aziz_light

GitHub: http://github.com/AzizLight/

GitHub Gist: http://gist.github.com/azizlight

Forrst: http://forr.st/-AzizLight


Top
   
 Post subject:
PostPosted: Wed Aug 11, 2010 1:55 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
A (perhaps) simpler approach is to use the admin group that Ubuntu* already has set up. You can add a user bob to the admin group with the command
Code:
usermod -a -G admin bob

and you're all set.

*At least, Ubuntu 8.04 does, not sure about later versions. If the line %admin ALL=(ALL) ALL is in your /etc/sudoers then this applies to you too.


Top
   
 Post subject:
PostPosted: Wed Aug 11, 2010 2:48 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
That line isn't in later versions, or not at least on linode, I checked.


Top
   
 Post subject:
PostPosted: Wed Aug 11, 2010 2:52 am 
Offline
Newbie
User avatar

Joined: Mon Aug 09, 2010 3:40 am
Posts: 3
I confirm that the admin group is not in Ubuntu 9.10+ (9.10 being what I use). But I did create the admin group and added it to the sudoers like you specified (I actually found that trick on a blog post).

Anyway, thanks for the help ;)

_________________
Blog: http://azizlight.me/

Twitter: http://twitter.com/aziz_light

GitHub: http://github.com/AzizLight/

GitHub Gist: http://gist.github.com/azizlight

Forrst: http://forr.st/-AzizLight


Top
   
 Post subject:
PostPosted: Wed Aug 11, 2010 10:57 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
That loud thumping sound is my head hitting the table repeatedly.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group