Group + User Script?

Packaging/Compiling/Client Information Forums, including Author's chit chat forum and soon others.

Postby dingetje » Thu Nov 22, 2007 5:41 pm

I need some installer script code to add a new user + group via code for the upcoming nagios package. Both user- and group name are known 'nagios', but the problem is to get/find a unique user- and group ID on the target system.

I'm sure I can whip something up myself, but if some other package author already invented this wheel, why should I?

TIA
GreetZ
http://dingetje.hopto.org

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1010
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Postby Lightning » Thu Nov 22, 2007 10:01 pm

Actually the built in useradd script has the function built in to find a unique user ID and that same code could easily be adapted to the user group for a custom script.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby dingetje » Fri Nov 23, 2007 1:51 am

doh! Why didn't I think too look into the treasure chest of FREESCO first?

Tnx!
GreetZ
http://dingetje.hopto.org

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1010
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands


Return to Packaging/Compiling/Client Information Forums

Who is online

Users browsing this forum: No registered users and 2 guests

cron