Adding a user
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.
11 Replies
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
I've very new to Linux so sorry if these were dumb questions. I think that part of the guide could be more detailed.
I'm in the sudo file through visudo. How do I add my new user here?
"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.
-Tim
Easier for most people that aren't doing a lot of editing.
Of course YMMV (so let the text editor flame wars begin).
@vonskippy:
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.
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
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.
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
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.
@vonskippy:
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.