Home | Mirror | Search

3. chpasswd - update passwords in batch mode

echo "user:password" | chpasswd

[root@dev1 ~]# adduser test
[root@dev1 ~]# echo "test:123456" | chpasswd
		

# cat passwd.txt
neo:neopass 
jam:jampass

# cat passwd.txt | chpasswd 
		
		
# chpasswd -c < passwd.txt
		 
		

passwd 命令實現相同功能

echo "mypasword" | passwd –stdin neo
		
comments powered by Disqus