LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-22-2010, 01:03 PM   #1
keleas
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Rep: Reputation: -1
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
 
Old 10-22-2010, 01:11 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What does /var/log/secure say?
 
Old 10-22-2010, 03:14 PM   #3
keleas
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: -1
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

Last edited by keleas; 10-22-2010 at 03:16 PM.
 
Old 10-23-2010, 06:19 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
How did you create the account?

Does the account still exist on the system?

What kind of authentication are you using? Local? NIS? LDAP?
 
Old 10-23-2010, 07:09 AM   #5
keleas
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: -1
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
 
Old 10-23-2010, 07:59 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
The "passwd" line in /etc/nsswitch.conf would tell you.

Is SSHD set to UsePAM in /etc/ssh/sshd_config?
 
Old 10-23-2010, 08:42 AM   #7
keleas
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: -1
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
 
  


Reply



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
how to create ftp user id in Centos solutionsdxb Linux - Newbie 7 08-04-2010 12:59 AM
Need to create a restricted user(Centos) ankushpandit Linux - Newbie 7 09-10-2009 09:24 AM
[SOLVED] How to create new user that can login SSH only and cant do other things else? kien23 Linux - Newbie 8 04-26-2009 10:55 AM
create a new user via ssh cccc Debian 4 08-01-2005 01:41 PM
how can i create a ssh-keygen for user?? yenonn Linux - General 1 06-14-2005 10:37 PM

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

All times are GMT -5. The time now is 10:35 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
Open Source Consulting | Domain Registration