Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

user is not in the sudoers file. This incident will be reported. cap deploy:setup [closed]

Tags:

linux

vps

Newest Update The flag is -p portnumber but I can't get into root, got (publickey, permission denied)

I sign up for a vps on digital ocean.

Currently going through this tutorial https://coderwall.com/p/yz8cha and this railscast http://railscasts.com/episodes/335-deploying-to-a-vps

I made a new user inside the vps but this user doesn't have sudo priveledge

when I do cap deploy:setup according to the guide I am getting this

judy is not in the sudoers file.  This incident will be reported.

failed: "sh -c 'sudo -p '\\''sudo password: '\\'' ln -nfs /home/judy/apps/lintong/current/config/nginx.conf /etc/nginx/sites-enabled/lintong'" on 192.241.241.204

I changed the port to 888 according to the guide and now I can't ssh into the server

when I do ssh root@ipaddress or ssh judy@ipaddress

its trying to connect to port 22

1st question how do I pass in a field to when I ssh into the vps with a port option of 888?

2nd question How do I give judy sudo rights? according to coderwall's tutorial I should do this

visudo

then

add username ALL=(ALL:ALL) ALL but I think I did it before and it didn't work?

like image 208
Jngai1297 Avatar asked Sep 04 '13 20:09

Jngai1297


2 Answers

For recent Ubuntu/Debian versions, don't modify /etc/sudoers, but add the user to to the sudo group in /etc/group.

sudo usermod -a -G sudo judy

or

sudo vigr (and sudo vigr -s)

To use ssh with a specific port, use -p 888 : i.e., ssh -p 888 judy@ipaddress

(Note that if you ever need to set a port with scp, you use a capital -P instead.)

like image 134
belacqua Avatar answered Nov 15 '22 05:11

belacqua


Answering just one question:

ssh -p 888 root@ipaddress

should allow you to log in when ssh is listening on port 888. Not sure what is wrong with the second part... can you show the judy entry from /etc/sudoers?

like image 43
Floris Avatar answered Nov 15 '22 07:11

Floris