LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2008, 07:33 PM   #1
Exit99
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
adduser, can't login via SSH, now what?


Okay, I've dealt with Linux on a basic level for years now, but I've never needed to manage a server until now. I've made the leap to a dedicated box from a reseller account and need to secure the server.

My first step is to create a user that is in the wheel group so that I can sudo when I need root access. I have no idea what are the proper steps, so here is what I've tried:

1. Created user:
adduser <username>
2. Needed to add a password:
usermod -p <password> <username>
3. Added new user to the wheel group:
vi /etc/group
-> Changed from:
wheel:x:10:root
to:
wheel:x:10:root,<username>

I checked home and see there is a folder for the username, but when I try to login via SSH the username and password do not work.

What am I missing?

Thanks.
 
Old 08-10-2008, 07:39 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Check the contents of /etc/passwd to see if the acct has been created, also look for a home dir.
What errors do you get logging in, both at the client and also check the server eg /var/log/secure, /var/log/messages etc.

Also, usually with sudo there's no need to add users to the 'wheel' group.
Maybe you've got remote root logins disabled (a good idea) and it thinks this new user also classifies as root?

Last edited by chrism01; 08-10-2008 at 07:41 PM.
 
Old 08-10-2008, 08:10 PM   #3
Exit99
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
I figured this out, I needed to use the command passwd, which then runs a script to manage the password. I didn't see a place to specify the password in the command line, so I assumed that command wasn't proper.

adduser <username>
passwd <username>
-> follow prompts

then editing the wheel group using vigr.

I've logged in and am now blocking root login access.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adduser with login starting with a number pbjams Linux - Newbie 7 01-30-2008 05:27 PM
ssh login kenji Linux - Security 6 03-27-2007 10:02 AM
ssh login rickylim *BSD 7 04-03-2006 02:55 AM
ssh login only with ip CloudBuilder Linux - Networking 3 07-31-2005 11:20 AM
ftp login -- ssh no login waffe Linux - General 4 12-27-2003 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration