LinuxQuestions.org
Visit Jeremy's Blog.
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 02-19-2014, 10:49 AM   #1
binojadoor
LQ Newbie
 
Registered: May 2013
Location: Bangalore
Posts: 9

Rep: Reputation: Disabled
Cannot change directory for NIS user in VSFTPD


I have a problem, I have installed VSFTPD and I am able to login with the local user.

C:\Users\binojs>ftp 10.204.94.94
Connected to 10.204.94.94.
220 (vsFTPd 2.2.2)
User (10.204.94.94none)): lab
331 Please specify the password.
Password:
230 Login successful.
ftp>

but when I am trying to login with a NIS user it gives the following error

C:\Users\binojs>
C:\Users\binojs>ftp 10.204.94.94
Connected to 10.204.94.94.
220 (vsFTPd 2.2.2)
User (10.204.94.94none)): binojs
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/homes/binojs
500 OOPS: priv_sock_get_cmd
Connection closed by remote host.

*******************SElinux is disabled**************

Please Help.
 
Old 02-19-2014, 11:18 AM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
It might be a typo, but if you have your home directory as /home/binojs on the FTP server, and in your NIS passwd file, you have /homes/binojs as you show in part two of your example...the issue could be the "s" on HOMES.
 
Old 02-19-2014, 11:44 AM   #3
binojadoor
LQ Newbie
 
Registered: May 2013
Location: Bangalore
Posts: 9

Original Poster
Rep: Reputation: Disabled
Is it possible to for the NIS users to land on a particular directory while logging into ftp (instead of user home directory), say if I have an NFS share where I have configured the root directory for local FTP users? I am able to do it for local users. I have thousands of users and creating home directory for all the users is not possible,

Last edited by binojadoor; 02-19-2014 at 11:46 AM.
 
Old 02-19-2014, 11:51 AM   #4
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
They will land in their HOME directory, based on the settings in NIS**; however, that does not mean they cannot change directories
Code:
cd /path/to/nfs-share/
to get where ever they need to go, assuming the users have permissions to the NFS share in the first place.


**(Everyone is typically assigned a home directory in NIS and it is usually an nfs share that is accessible (and mounted) to all of the machines that utilize the YP services. This gives the user access to "their" data, no matter where they are in the network.)

HTH

Last edited by netnix99; 02-19-2014 at 11:54 AM.
 
Old 02-19-2014, 12:16 PM   #5
binojadoor
LQ Newbie
 
Registered: May 2013
Location: Bangalore
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you Netnix99 for the quick reply, so you mean to say, it is not possible for the ftp user (NIS user) to land on any other directory other than the home directory? (while logging into FTP server.)

Last edited by binojadoor; 02-19-2014 at 12:21 PM.
 
Old 02-19-2014, 12:41 PM   #6
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
It's POSSIBLE, but that is not how NIS is typically implemented. In your NIS passwd file, you will have a user listing like this:

Code:
usera:x:1001:1001:Im A User:/home/usera:/bin/bash
where /home/usera is the home directory. Any machine using NIS for user authentication will drop the user into /home/usera when they log in. (upon login - user issues the "pwd" command - and /home/usera is the reply)


That said, you COULD POSSIBLY do this, but please understand **********THIS IS NOT THE WAY TO USE NIS**********:
Code:
usera:x:1001:1001:Im A User:/path-to-nfsshare:/bin/bash
and the user would be put in the FTP nfs share; HOWEVER, what happens when they log into a different machine where that nfs share does NOT exist?? See the issue here? Fixing the issue on the FTP server breaks every other machine that uses NIS.
**********THIS IS NOT THE WAY TO USE NIS**********

Another alternative is "don't use NIS for FTP logins" but then you have to create all new user accounts...and maintain them...

Does this make sense??

Last edited by netnix99; 02-19-2014 at 12:43 PM.
 
Old 02-19-2014, 12:49 PM   #7
binojadoor
LQ Newbie
 
Registered: May 2013
Location: Bangalore
Posts: 9

Original Poster
Rep: Reputation: Disabled
got it, Thanks a lot Netnix99
 
Old 02-19-2014, 01:20 PM   #8
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
Glad to help!!
 
  


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
change NIS user password boby.kumar Linux - Newbie 6 09-19-2013 12:34 AM
VSFTPD is giving me "cannot change directory:/var/$USER" RalfR Linux - Server 3 02-13-2013 12:17 AM
How to edit PAM DB of VSFTPD (..add user, delete user, change user password ) jsaravana87 Linux - Server 1 10-02-2012 09:49 AM
nis user home directory problem mihaelamr2 Solaris / OpenSolaris 7 01-06-2011 06:28 AM
vSFTPd problem, cannot change directory... danj_fc5usr Linux - Software 0 08-05-2006 02:15 AM


All times are GMT -5. The time now is 07:07 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