Portál AbcLinuxu, 13. května 2025 23:44
groupadd -g 2001 ftpgroup useradd -u 2001 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuserděkuji
Prostě nahraďte číslo 2001 něčím, co není GID resp. UID existujícího uživatele. Nejjednodušší bude to '-g 2001
' resp. '-u 2001
' vynechat úplně, groupadd
a useradd
si pak nějaké volné zvolí samy.
P.S.: se shellem váš dotaz nemá naprosto nic společného.
jak nema spolecne?? to se nepise do terminalu?? dekujiProstě nahraďte číslo 2001 něčím, co není GID resp. UID existujícího uživatele. Nejjednodušší bude to '
-g 2001
' resp. '-u 2001
' vynechat úplně,groupadd
auseradd
si pak nějaké volné zvolí samy.P.S.: se shellem váš dotaz nemá naprosto nic společného.
useradd [-c comment] [-d home_dir] [-e expire_date] [-f inactive_days] [-g initial_group] [-G group[,...]] [-m [-k skeleton_dir]] [-o] [-p passwd] [-s shell] [-u uid] login
Then we create an ftp group ("ftpgroup") and user ("ftpuser")…
Tak schválně, co byste asi tak řekl?
INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES ('ftpgroup', 2001, 'ftpuser');
Now we are done with the table ftpgroup. We do not have to create further entries here. Whenever you create a new virtual ftp user, you do this in the tables ftpquotalimits and ftpuser. So let us create our first user (we are still on the MySQL shell):
INSERT INTO `ftpquotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('exampleuser', 'user', 'true', 'hard', 15728640, 0, 0, 0, 0, 0);
INSERT INTO `ftpuser` (`id`, `userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`, `count`, `accessed`, `modified`) VALUES (1, 'exampleuser', 'secret', 2001, 2001, '/home/www.example.com', '/sbin/nologin', 0, '', '');
(Do not forget to replace the groud- and userid 2001 appropriately in the last INSERT statement if you are using other values than in this tutorial!)
tak vubec nevim jak ty cisla nastavit zpravne
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.