You are not logged in.

#1 2010-10-02 12:16:41

Nepherte
Member
From: Belgium
Registered: 2008-09-09
Posts: 427
Website

Creating a group and user

I'm packaging an application (http://ilk.uvt.nl/mbt) which acts as a server. I'd like to create a specific user and group for it called mbt. How do I make sure it doesn't conflict with existing users and groups (cfr. group ids, ...)?

Offline

#2 2010-10-02 13:20:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: Creating a group and user

Let {group,user}add pick the ID for you (don't specify -g## or -u##, respectively) if you don't want it to conflict. You can use getent to view chunks of the appropriate user/group databases and check for existance of the name itself.

Offline

#3 2010-10-02 14:13:25

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,268
Website

Re: Creating a group and user

falconindy wrote:

Let {group,user}add pick the ID for you (don't specify -g## or -u##, respectively) if you don't want it to conflict. You can use getent to view chunks of the appropriate user/group databases and check for existance of the name itself.

Unless you need to set ownership in the package to the new UID/GID. I have to do this in the amanda package.

I look at this page when I'm doing these kind of things, but it's outdated AFAIK, and it's no guarantee there wouldn't be a clash even if it was up to date.
http://wiki.archlinux.org/index.php/Dev … D_Database

Offline

#4 2010-10-02 15:05:38

Nepherte
Member
From: Belgium
Registered: 2008-09-09
Posts: 427
Website

Re: Creating a group and user

I'll just check whether the user and group already exist and let groupadd/useradd determine the id. That should suffice.

Offline

Board footer

Powered by FluxBB