LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-11-2013, 07:36 AM   #1
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,080

Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
Alias a User ID?


I seem to remember that there is a reasonable way to alias a user id but darned if I can find anything about doing that.

I have an application, DSpace, that runs in Tomcat and must have the same user id as Tomcat (no big deal, I simply make Tomcat the owner and group of the DSpace directories) -- but "dspace" must exist as an account for some things.

I can just edit /etc/passwd and change dspace to the Tomcat ID and group but that, as I recall, is a Big No-No; it works, but ya just ain't supposed to be doing that.

Anybody have any ideas, I'd appreciate knowing them.
 
Old 09-11-2013, 12:32 PM   #2
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12 and higher
Posts: 229

Rep: Reputation: 51
You can do it by setting the UID of both users to be the same number. See http://docstore.mik.ua/orelly/networ...is/ch04_01.htm

See section: 4.1.2 Multiple Accounts with the Same UID

Which, upon inspection, seems to be the same thing that you were suggesting, but now with supporting excuses! ;vD
 
Old 09-11-2013, 01:54 PM   #3
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 279

Rep: Reputation: 66
Quote:
Originally Posted by tronayne View Post
I can just edit /etc/passwd and change dspace to the Tomcat ID and group but that, as I recall, is a Big No-No; it works, but ya just ain't supposed to be doing that.
I've done this occasionally over the years without any negative affects.

You have to remember to change the UID and GID of all files owned by that user.

If there are programs/scripts looking for that specific UID/GID by number instead of name, then those must also be modified. The best situation is when you know the UID/GID must match in multiple systems and you set up those accounts to match when they are created. Then any autogenerated scripts using that user/group as part of an installation process are correctly created.

If any "permissions" lists use UID/GID instead of the name those would need to be modified. (ACLs?)

On UNIX systems in the past I've changed the name of UID "zero" from root to something innocuous in an attempt to increase security on multi-user systems. (security through obscurity) I always had to change it back to root however because many (most?) programs/scripts use the name (root) and not the UID (0) when installing software updates and such (a bad choice IMHO).

There may be something different in Linux from UNIX that I'm not considering.

EDIT: I recommend changing the UID/GID of a single user rather than having two or more user names with the same UID/GID. Although both methods will probably work for your purposes, other complications can arise when user names need to match.

Last edited by TracyTiger; 09-11-2013 at 01:56 PM. Reason: Last Sentenced Added
 
Old 09-12-2013, 07:50 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,080

Original Poster
Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
Thanks for those thoughts; I decided to simply change the dspace UID to that of Tomcat (along with the GID). DSpace, the application, works fine, no problems.

I kind of held my nose, though, just have a real hard time reconciling two user accounts with the same UID and GID (even though Tomcat is not actually a "user"). Many (too many) years ago I spent time chasing down a problem on a System 3 box that turned out to be a duplicate UID user causing difficulties; that, a lesson learned during a wasted youth.

Oh, well, make a note, remember that it's there and get on with it.

Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] POSTFIX - virtual domain and alias maps results in 'unknown user' brenton.williams Linux - Server 2 08-19-2009 12:32 AM
alias for user to gain root tty with no passwd officecase Linux - General 2 05-11-2007 11:05 AM
Alias name for user root? officecase Linux - Security 9 05-10-2007 01:38 PM
alias specific to a user - or is that possible? wahooee Linux - Newbie 1 04-27-2006 02:14 PM
Gnome Profiles for User Alias pymehta Linux - Software 0 06-12-2004 05:06 AM


All times are GMT -5. The time now is 04:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration