, , ,

Step 1: Get all the user name from /etc/passwd file

root@access /h/fakrul# awk -F’:’ ‘{ print $1 }’ /etc/passwd > userlist.txt

Step 2: Add , at end of each line

root@access /h/fakrul# sed -e ‘s/$/,/’ userlist > userlist2.txt

Step 3: Remove all the line break and replace them with space

root@access /h/fakrul# sed ‘:a;N;$!ba;s/n/ /g’ userlist2.txt > userlist3.txt

Now create the desire aliases file from this txt file.