Author Topic: UID/GID Listing?  (Read 674 times)

Offline Kaboosh

  • Jr. Member
  • **
  • Posts: 29
UID/GID Listing?
« on: February 06, 2011, 06:15:53 PM »
Dear Packagers,

I noticed the following in the specfile for kde4-config which I've been using as a guide to build a custom RPM for myself:
Code: [Select]
SYSUSERS=`cat /etc/passwd | grep "/bin/bash" |grep "[0-9][0-9][0-9]" |cut -d: -f1`
SYSUSERS=${SYSUSERS/named/}
for idx in $SYSUSERS
 do INP1= cp -af /etc/skel/.local/* /home/$idx/.local; done

Is there some way (in bash which RPM uses for scripting) to determine which UIDs/GIDs are in use on the system without directly accessing /etc/{passwd,group}?  PCLinuxOS offers alternate authentication mechanisms out of the box and I think this approach will break under a different configuration...   :-\