#!/bin/bash
#Get the details of user
echo "Enter the user name"
read n
echo "username is :`cat /etc/passwd | grep $n | cut -d : -f 1`"
echo "password is :`cat /etc/passwd | grep $n | cut -d : -f 2`"
echo "user-id is :`cat /etc/passwd | grep $n | cut -d : -f 3`"
echo "group-id is :`cat /etc/passwd | grep $n | cut -d : -f 4`"
echo "fullname is :`cat /etc/passwd | grep $n | cut -d : -f 5`"
echo "default directory is :`cat /etc/passwd | grep $n | cut -d : -f 6`"
echo "default shell is :`cat /etc/passwd | grep $n | cut -d : -f 7`"
#Get the details of user
echo "Enter the user name"
read n
echo "username is :`cat /etc/passwd | grep $n | cut -d : -f 1`"
echo "password is :`cat /etc/passwd | grep $n | cut -d : -f 2`"
echo "user-id is :`cat /etc/passwd | grep $n | cut -d : -f 3`"
echo "group-id is :`cat /etc/passwd | grep $n | cut -d : -f 4`"
echo "fullname is :`cat /etc/passwd | grep $n | cut -d : -f 5`"
echo "default directory is :`cat /etc/passwd | grep $n | cut -d : -f 6`"
echo "default shell is :`cat /etc/passwd | grep $n | cut -d : -f 7`"
0 comments:
Post a Comment