3

I'm trying to add users to ftp using pure-ftp

I used the following command:

pure-pw useradd test-user -u ftpgroup -d /path/to/my/dir

And I get the following error:

You must give (non-root) uid and gid

Is there anything I can do to get this working?

Thanks

2 Answers 2

5

You need to give a -u uid and -g gid.

pure-pw useradd test-user -u 1234 -g 1234 -d /path/to/my/dir

Obviously use your own numbers...

2
  • Is 1234 a user? i.e. one that has been created by useradd 1234 and passwd 1234?
    – terrid25
    Commented May 30, 2012 at 14:08
  • No, uid is a numeric ID of the user. And gid is a numeric ID relating to the group.
    – Sirch
    Commented May 30, 2012 at 14:13
3

Or find the numbers as explained in this article

To find a user's UID or GID in Unix, use the id command. To find a specific user's UID, at the Unix prompt, enter:

id -u username

Replace username with the appropriate user's username. To find a user's GID, at the Unix prompt, enter:

id -g username

If you wish to find out all the groups a user belongs to, instead enter:

id -G username

If you wish to see the UID and all groups associated with a user, enter id without any options, as follows:

id username

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .