LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-29-2012, 09:59 PM   #1
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Rep: Reputation: 0
Exclamation Can sftp into root account, but not created user?


I installed Ubuntu Server 9.10, and started configuring it. Changed my SSH port to a more secure one, etc etc. The primary account I'm using right now (yes I know it's not advisable but I get tired of typing "sudo" every time I wish to make a change) is the root. I can use FileZilla and quick connect to the root account at the IP address with that port. However, I went to http://www.the-web-book.com/build-yo...webserver.html and started following the directions for the FTP section. I created the account (though not named webuser1), configured my shell, etc, etc. However, while I can ftp and ssh my root account, I cannot SSH or FTP into my created users account(If I recall correctly, I shouldn't be able to SSH, which is great!) However, I need to set it up correctly for web users to have their own accounts... however every time I attempt to connect to that account (quick connect) with that I IP (sftp://IP here) it closes out with a "connection closed by server error code 1". Any help? Thanks!
 
Old 01-29-2012, 10:16 PM   #2
FancY_Hat
LQ Newbie
 
Registered: Jan 2012
Posts: 8

Rep: Reputation: Disabled
It may be helpful to get a look at your permissions for the file. Are able to post the output of
Code:
ls -al
 
Old 01-29-2012, 10:52 PM   #3
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
ls -al:

total 32
drwx------ 5 root root 4096 2012-01-27 14:03 .
drwxr-xr-x 21 root root 4096 2012-01-27 13:22 ..
drwx------ 2 root root 4096 2012-01-27 13:10 .aptitude
-rw------- 1 root root 2824 2012-01-29 13:33 .bash_history
-rw-r--r-- 1 root root 3106 2010-04-23 00:45 .bashrc
drwxr-xr-x 2 root root 4096 2012-01-27 13:45 .cache
-rw-r--r-- 1 root root 140 2010-04-23 00:45 .profile
drwxr-xr-x 2 root root 4096 2012-01-27 13:43 .uml
 
Old 01-30-2012, 02:38 AM   #4
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Ubuntu
Posts: 199

Rep: Reputation: 36
How did you create your users (with a program or by yourself)?
Users must have an entry in /etc/passwd, /etc/group and have created their /home/username directory.
 
Old 01-30-2012, 04:52 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,190
Blog Entries: 4

Rep: Reputation: 220Reputation: 220Reputation: 220
can you login through command prompt using your port no

Code:
#sftp -v -oPort=xxx user@domain.com
 
Old 01-30-2012, 07:33 AM   #6
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
I used
"cd /var/www
mkdir webuser1
useradd webuser1 p xxxx d /var/www/webuser1 s /bin/false
chown webuser1 webuser1
passwd webuser1"

after adding "bin/false" to the /etc/shells file.
Then I edited the "proftpd.conf" file to jail the users to their home directory.

Also, did you mean through command line in Linux or command prompt in Windows, since you said command prompt?
 
Old 01-30-2012, 11:24 PM   #7
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
I would really appreciate help as quickly as possible, as this web server needs to be up and running. Sorry to bother, but I'm kind of pushed for time right now. Thanks!
 
Old 01-30-2012, 11:35 PM   #8
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,190
Blog Entries: 4

Rep: Reputation: 220Reputation: 220Reputation: 220
I meant on the linux box and show me the output

I have never worked with this server but here is one link which I found try this

http://forums.glowhost.com/knowledge...panel-926.html
 
Old 01-31-2012, 08:34 AM   #9
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
I should mention that I am using PuTTY to SSH from Win7 to my machine, shouldn't I? Also, I'll take a look at that link, thanks!
 
Old 01-31-2012, 05:02 PM   #10
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
As deep27ak mentioned: you can use (triple) -v also to sftp from a Linux machine to get some error log (maybe the server itself).
 
Old 01-31-2012, 06:30 PM   #11
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
When I tried to sftp from my server to my Win7 machine, I got the message "error: connection reset by peer".
 
Old 01-31-2012, 06:35 PM   #12
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
You run an ssh daemon on your Windows7 machine?
 
Old 01-31-2012, 09:22 PM   #13
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
Again, yes. I ssh *from* my Win7 machine *to* my Ubuntu Server with a PuTTY(.exe) session.
 
Old 02-02-2012, 11:16 PM   #14
ashamanmiller
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
Any help? Please? Or should I just install a different server software and try again? I need my web server up and running soon!
 
Old 02-03-2012, 09:31 AM   #15
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 283

Rep: Reputation: 47
I don't think SFTP will work with /bin/false as a shell.
 
  


Reply

Tags
connect, error, ftp, sftp, user


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
User account with SFTP access only nsfx Linux - General 3 01-06-2008 07:52 PM
I could use the user account I created in FC 5, but after upgrading to FC 6 I cannot pradnyasoorya Linux - General 3 02-06-2007 07:25 AM
Can a root account be created? darkhatter Ubuntu 9 03-22-2006 10:47 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
Created a user account on slackware and now I cant enter root shirokiba Linux - Newbie 2 04-18-2004 08:44 PM


All times are GMT -5. The time now is 03:40 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration