I'm making a bash script which should create an ftp user.
ftpasswd --passwd --file=/usr/local/etc/ftpd/passwd --name=$USER --uid=[xxx]
--home=/media/part1/ftp/users/$USER --shell=/bin/false
The only supplied argument to script is user name. But ftpasswd
also requires uid
. How do I get this number? Is there an easy way to scan passwd
file and get the max number, increment it and use it? Maybe it's possible to obtain that number from the system?