Just created a new virtual Ubuntu server and I'm in the process of hardening it for production use. I currently have a root account. I want to do the following:
- Create a new user (let's call them
jimfor the rest of this). I want them to have a/home/directory. - Give
jimSSH access. - Allow
jimtosuto root but not performsudooperations. - Turn off root SSH access.
- Move SSHd off to a non-standard port to help stop brute-attacks.
My problem lies with the first two items. I've already found useradd but for some reason, I can't log in as a user created with it over SSH. Do I need to beat SSHd to allow this?
/etc/nologinfile but it's empty. I deleted it and restarted ssh but it's still just respondingPermission denied, please try again.when I try and log in. – Oli Dec 08 '10 at 16:42jimx:1000:1000::/home/jim:/bin/bash– Oli Dec 08 '10 at 16:44:betweenjimandx. Why would you allowsuto root, but disallowsudo? – Lekensteyn Dec 08 '10 at 17:08jimso I've been editing it.. Obviously got carried away there. – Oli Dec 08 '10 at 17:23