Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

what does getent do

HI,
I have a following in a spec of an rpm :
%pre
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
getent passwd %{username} >/dev/null || useradd -r -g %{groupname} -s /sbin/nologin %{username}
install -d /var/log/%{name} -o %{username} -g %{groupname} -m 750
exit 0

Open in new window


what does getent do. Also how are %{groupname} specified ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of DIPRAJ
DIPRAJ
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rohit Bajaj

ASKER

Can you please explain what its doing in the above code and why its required in a predeployment script ?
Also what does install do here ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial