Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Adding a user
PostPosted: Thu Jul 12, 2012 1:34 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
http://library.linode.com/securing-your-server

Going though the tutorial here, and when I try to add my new user to the 'sudo' group I get.

usermod: group 'sudo' does not exist

Any ideas? Thank you.


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 1:59 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
Okay some Googling.

It wanted me to do:

usermod -a -G sudo example_user

Did it really want me to do this instead?

usermod -a -G adm example_user


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 2:02 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
Also the guide doesn't mention to assign the new user created with a password, which apparently needs to be done. I'm in now as the new user.

I've very new to Linux so sorry if these were dumb questions. I think that part of the guide could be more detailed.


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 2:06 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
Hmm but sudo doesn't work for this new user.

I'm in the sudo file through visudo. How do I add my new user here?


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 2:11 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
Not trying to sound crazy talking to myself, but maybe my mistakes can help someone in the future.

http://www.garron.me/linux/visudo-comma ... ditor.html

"visudo command uses vi as the editor here some tips to use it:

Switch to root, (su root), then run visudo, (as above).
Find where it says “root ALL=(ALL) ALL”.
Type “o” to insert a new line below it.
Now type what you want to insert, eg “username ALL=(ALL) ALL”.
Hit esc to exit insert-mode.
Type “:x” to save and exit."

This worked for me, now I can use sudo when logged in as the user. Did I do anything wrong or unsecured? Thanks.


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 4:00 pm 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
Those getting started articles are written primarily for Debian/Ubuntu. Which distro are you using?

-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 4:23 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Might want to try nano instead of vi or vim for your text editor.

Easier for most people that aren't doing a lot of editing.

Of course YMMV (so let the text editor flame wars begin).

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 5:13 pm 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
vonskippy wrote:
Might want to try nano instead of vi or vim for your text editor.

Easier for most people that aren't doing a lot of editing.

Of course YMMV (so let the text editor flame wars begin).


Go vim or go home. :P -- Just kidding.

Nano is quite a bit easier to use if you are newer, and don't need to do any advanced editing. I have taught myself to use vim, and am glad I have done so. However, old habits die hard.

-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 6:00 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
I am using Fedora, but I got it working. I notice a bunch of difference but some Google an common sense have me at rDNS.

http://library.linode.com/hosting-website

I'm not sure if my /etc/hosts is right, I have: (My domain is my real one in settings)

127.0.0.1 localhost
66.228.48.55 mydomain.com

When I do the rDNS under remote access I get:

• No match was found for 'mydomain.com'. Reverse DNS must have a matching forward entry that points to one of your IPs.

NM: I'm dumb, I didn't change my A record to point to my Linode IP. Fixed.

Still though my domain is not pointing to server. I'm still not sure my /etc/hosts is correct, also I'm not too sure if I'm using a virtual host or not, or what the difference is. I do want to host more than one site on here.


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 6:57 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
When I put in the IP, nothing comes up. But I'm not 100% sure where apache has the folder set.

Is it because I can't do this in Fedora?

sudo a2ensite example.com

To link the directory in /etc/apache2/sites-available/example.com with my site location in /home/domain/public/domain.com/public


Top
   
 Post subject: Re: Adding a user
PostPosted: Thu Jul 12, 2012 8:49 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Fedora (and RHEL/CentOS/et al) all use the pure form of Apache (just kidding all you Deb/Ubu fans).

It uses httpd not apache2.

You need to setup httpd.conf in /etc/httpd/conf/httpd.conf

And start it with 'service httpd start'

And make it autostart with 'chkconfig httpd on'

If you have multiple virtual hosts in apache, setup httpd.conf to use a separate vhost folder (makes it easier to add/edit/disable/delete) the individual virtual hosts.

All kind of moot for rDNS, which is only required if you're going to be using your VPS as a SMTP server.

And it's really hard to help you trouble shoot when you hide your PUBLIC DOMAIN NAME from a support forum. Not sure where the security myth started that it's better to mask public available details. Don't post username/passwords, but if the server is going to have publicly facing services (i.e. web/email/etc), it's PUBLIC, so hiding it here just makes troubleshooting not worth it for most volunteers.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Fri Jul 13, 2012 3:55 am 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 1:30 pm
Posts: 10
vonskippy wrote:
Fedora (and RHEL/CentOS/et al) all use the pure form of Apache (just kidding all you Deb/Ubu fans).

It uses httpd not apache2.

You need to setup httpd.conf in /etc/httpd/conf/httpd.conf

And start it with 'service httpd start'

And make it autostart with 'chkconfig httpd on'

If you have multiple virtual hosts in apache, setup httpd.conf to use a separate vhost folder (makes it easier to add/edit/disable/delete) the individual virtual hosts.

All kind of moot for rDNS, which is only required if you're going to be using your VPS as a SMTP server.

And it's really hard to help you trouble shoot when you hide your PUBLIC DOMAIN NAME from a support forum. Not sure where the security myth started that it's better to mask public available details. Don't post username/passwords, but if the server is going to have publicly facing services (i.e. web/email/etc), it's PUBLIC, so hiding it here just makes troubleshooting not worth it for most volunteers.


Fair enough, I made the edits but it's still not working. Could I use something like pate bin and post my httpd.conf file here?

Also I followed the Linode guide all the way to here so, possibly I was told something incorrect to do in regard to Fedora? I'm trying to do the single hosting and commected out all the virtual host stuff just to make it simpler trying to get a page to display using IP or domain.

With help from IRC channel, got it working. For some reason my firewall rules were not persisting after a reboot, so it was denying http traffic.


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


Who is online

Users browsing this forum: mattltm and 3 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