add 'n' user
#newusers
1)
check>>>/etc/passwd
jonny:$1$eb30c0TU$r4ZosogN/Aev83kMS/erq0:1000:1000:Deva-Jonny,,,:/home/jonny:/bin/bash
jonny (Login name)
$1$eb30c0TU$r4ZosogN/Aev83kMS/erq0 (EncPassword)
1000 (User Identifier)
1000 (Group Identifier)
Deva-Jonny,,, (Note)
/home/jonny (Home directory)
/bin/bash (users Shell)
2)
stu001::600:600:stu:/home/stu001:/bin/bash
stu002::601:601:stu:/home/stu002:/bin/bash
stu003::602:602:stu:/home/stu003:/bin/bash
stu004::603:603:stu:/home/stu004:/bin/bash
save as newuser_list.csv
3)
sudo newusers < newuser_list
4)
write passwd in /etc/passwd from /etc/shadow & del /etc/shadow
sudo pwunconv
Ref>
http://jonny.ubuntu-tw.net/2008/03/ubuntunewusers-n.html
沒有留言:
張貼留言