Hi All,
I am confused about users. IIRC, ftp users are just ordinary users on the system (/etc/passwd)
Is there an add user wizard from the command-line?
I dont quite get all of the steps to add a user, dont let login except FTP, etc, etc
-Jason
Jason Todd Slack-Moehrle wrote:
Hi All,
I am confused about users. IIRC, ftp users are just ordinary users on the system (/etc/passwd)
Is there an add user wizard from the command-line?
Quick way is typically: adduser <username> passwd <username>
I dont quite get all of the steps to add a user, dont let login except FTP, etc, etc
Here I would run: chsh <username>
and set it to something like /sbin/nologin or /dev/null, this will prevent someone logging in through ssh/telnet etc. Some ftp servers will also prevent you from logging in as well, depends on their config. Debian Linux's 'adduser' command is more wizard like, I'm not aware of anything myself on the CentOS side that is similar:
vmware2:~# adduser testme Adding user `testme' ... Adding new group `testme' (1002) ... Adding new user `testme' (1002) with group `testme' ... Creating home directory `/home/testme' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for testme Enter the new value, or press ENTER for the default Full Name []: test account Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
Similar to add a user to a group: adduser <username> <groupname>
Which is pretty easy, I think in CentOS/RHEL the main way to do this is using the 'usermod' command(I usually just edit the group file by hand..)
Or you could use a ftp server that maintains it's own user database, I think servers like proftpd and pureftpd have the ability to use an external dedicated user database and not rely upon system authentication. It depends on what you need the ftp server for, if the users are uploading content for a web server or something or if it's just for basic file storage.
nate
nate wrote:
Jason Todd Slack-Moehrle wrote:
Hi All,
I am confused about users. IIRC, ftp users are just ordinary users on the system (/etc/passwd)
Is there an add user wizard from the command-line?
Quick way is typically: adduser <username> passwd <username>
actually, useradd is the proper command. adduser is a alias
I dont quite get all of the steps to add a user, dont let login except FTP, etc, etc
Here I would run: chsh <username>
and set it to something like /sbin/nologin or /dev/null, this will
or...
useradd -s /sbin/nologin username passwd username
and do it in one pass
John, Nate, Daniel.
Thank you, I will see if ProFTP has its own user system I can use as they are just uploading web content, I dont need them to be accounts on the system.
This list is awesome BTW, never has any group been so helpful! I am really learning and I dont think I will go back to Windows hosting ever again. (I use OS on my desktop)
-Jason
On May 4, 2009, at 10:56 PM, John R Pierce wrote:
nate wrote:
Jason Todd Slack-Moehrle wrote:
Hi All,
I am confused about users. IIRC, ftp users are just ordinary users on the system (/etc/passwd)
Is there an add user wizard from the command-line?
Quick way is typically: adduser <username> passwd <username>
actually, useradd is the proper command. adduser is a alias
I dont quite get all of the steps to add a user, dont let login except FTP, etc, etc
Here I would run: chsh <username>
and set it to something like /sbin/nologin or /dev/null, this will
or...
useradd -s /sbin/nologin username passwd username
and do it in one pass
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Jason Todd Slack-Moehrle wrote:
John, Nate, Daniel.
Thank you, I will see if ProFTP has its own user system I can use as they are just uploading web content, I dont need them to be accounts on the system.
how would you sort out file ownership in such a system? everything owned by 'ftpuser' or 'nobody' ?
for uploading web content, have you considered using DAV aka WebDAV ? I know FTP is 'traditional' but its a horrid old insecure protocol that really deserves to die.
If adding several users, you may want to try something such as:
for (( i = 0; i <=100; i++ )); do echo $1; adduser student$i; echo "password" | passwd --stdin "student$i"; done
Of course, modify the for loop if you just need to add a few specific named accounts. I used this one for a school setup.
Alternatively:
# adduser steve; echo "steve's_password" | passwd --stdin "steve"
Will create a single user (steve) and assign the given password within quotes. It is an easy command string to alias, as well.
Daniel
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of nate Sent: Monday, May 04, 2009 11:35 PM To: centos@centos.org Subject: Re: [CentOS] Users
Jason Todd Slack-Moehrle wrote:
Hi All,
I am confused about users. IIRC, ftp users are just ordinary users on the system (/etc/passwd)
Is there an add user wizard from the command-line?
Quick way is typically: adduser <username> passwd <username>
I dont quite get all of the steps to add a user, dont let login except FTP, etc, etc
Here I would run: chsh <username>
and set it to something like /sbin/nologin or /dev/null, this will prevent someone logging in through ssh/telnet etc. Some ftp servers will also prevent you from logging in as well, depends on their config. Debian Linux's 'adduser' command is more wizard like, I'm not aware of anything myself on the CentOS side that is similar:
vmware2:~# adduser testme Adding user `testme' ... Adding new group `testme' (1002) ... Adding new user `testme' (1002) with group `testme' ... Creating home directory `/home/testme' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for testme Enter the new value, or press ENTER for the default Full Name []: test account Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
Similar to add a user to a group: adduser <username> <groupname>
Which is pretty easy, I think in CentOS/RHEL the main way to do this is using the 'usermod' command(I usually just edit the group file by hand..)
Or you could use a ftp server that maintains it's own user database, I think servers like proftpd and pureftpd have the ability to use an external dedicated user database and not rely upon system authentication. It depends on what you need the ftp server for, if the users are uploading content for a web server or something or if it's just for basic file storage.
nate
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos