Tips & Tricks


#61

How to read passwords from file and set them from command line (kao root user)

[root@ftp ~]# for i in `paste -d ":" username.txt pass.txt`; do echo $i | chpasswd; done

username.txt

pass.txt

p.s.
Naravno podrazumjeva se da postoje useri na sistemu, ako ne onda se i oni mogu đuture napraviti

[root@ftp ~]# for i in `cat username.txt`; do useradd -m $i; done

#62

$ findmnt umjesto $ mount