Site icon 지락문화예술공작단

common usage of the ftpasswd tool

 

ftpasswd 명령을 이용한 계정 생성

 

1. 환경

– os : linux

– ftp : proftpd

– proftpd prefix : /usr/local/proftpd

 

2. 존재하는 시스템 계정

realaccount1:x:1009:1009::/home/realaccount1:/bin/bash
– id (account name) : realaccount1
– uid : 1009
– gid : 1009
– homedir : /home/realaccount1

 

3. 생성하려는 FTP 계정

– id : ftpaccount1
– pass : P@ssword

생성한 계정은 realaccount1 에 매칭을 시키면서 동일한 권한을 갖게 하는 것이 목적임

 

4. proftpd.conf

AuthOrder mod_auth_file.c mod_auth_pam.c mod_auth_unix.c
AuthGroupFile /usr/local/proftpd/etc/auth.group
AuthUserFile /usr/local/proftpd/etc/auth.passwd

 

5. 계정 생성 명령

* 그룹 생성

/usr/local/proftpd/bin/ftpasswd –group –file /usr/local/proftpd/etc/auth.group –gid 1009 –name ftpaccount1

 

* 계정 생성

echo P@ssword | /usr/local/proftpd/bin/ftpasswd –passwd –file /usr/local/proftpd/etc/auth.passwd –gid 1009 –shell /sbin/nologin –uid 1009 –home /home/realaccount1 –name ftpaccount1 –stdin

 

 

Exit mobile version