LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create user for CentOS w/ ssh (https://www.linuxquestions.org/questions/linux-newbie-8/create-user-for-centos-w-ssh-839816/)

keleas 10-22-2010 01:03 PM

Create user for CentOS w/ ssh
 
Hi all,

I've got a remote server running CentOS and I require a new user account who would have access to sftp & ssh functions.

I've got a bit of a problem creating the user since whenever I try to login with the new account through ssh (putty) I keep getting access denied.

I've made different accounts with userids above /below 500; even though I'm a complete noob so no idea how I'm supposed to go about this.

Thanks,
Keleas

AlucardZero 10-22-2010 01:11 PM

What does /var/log/secure say?

keleas 10-22-2010 03:14 PM

Hey,

I checked the secure log and it said the username wasnt on the AllowUsers list; so I added the username to the list in sshd_config.

Its still denying access but now it says 'Failed password for invalid user .. '

I've double checked the password and tried with multiple accounts but it still saying same error.

I havent assigned this user to a group or such, does this have an effect on logging in?

cheers

AlucardZero 10-23-2010 06:19 AM

How did you create the account?

Does the account still exist on the system?

What kind of authentication are you using? Local? NIS? LDAP?

keleas 10-23-2010 07:09 AM

Yo
 
Hi,

I created the account by logging in as root then using ' useradd username ' then assigning a password

Yea the accounts still exist on the system

I'm not sure what authentication I'm using, I can't find a command just to display or show what type it is, I don't really want to change anything for fear of messing something up.

Cheers for the help

AlucardZero 10-23-2010 07:59 AM

The "passwd" line in /etc/nsswitch.conf would tell you.

Is SSHD set to UsePAM in /etc/ssh/sshd_config?

keleas 10-23-2010 08:42 AM

Yo,

Yea in sshd_config its set to UsePAM.

In sswitch its set as

# Example:
#passwd: db files nisplus nis
...

passwd: files

Is this automatically set to nis or do I have to assign it there manually? just don't want to lock myself out,

Cheers


All times are GMT -5. The time now is 03:38 AM.