(1001) ...
Adding new user `test-1' (1001) with group `test-1' ...
Creating home directory `/home/test-1' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for test-1
Enter the new value, or press ENTER for the default
Full Name []: Test User
Room Number []: 1
Work Phone []: 2
Home Phone []: 3
Other []: 4
Is the information correct? [Y/n] Y
Готовлю команду: echo -e 'password\npassword\nTest User\n1\n2\n3\n4\nY' | adduser test-2
Чекаю результат:
root@zabbix:~# grep test /etc/passwd
test-1:x:1001:1001:Test User,1,2,3,4:/home/test-1:/bin/bash
test-2:x:1002:1002:Test User,1,2,3,4:/home/test-2:/bin/bash
спасибо, это шаг вперед! покопаю еще.
Обсуждают сегодня