LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-19-2006, 01:00 AM   #1
nico562
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Rep: Reputation: 0
Safe to use non-unique UID ?


Hi, i am manageing a system where we have a whole bunch of users.
Their only purpose on the system, is to logon through ssh, and manage their own "html" folder, which contains their website.

1) i was wondering if it could be okey to use a non-unique UID, for future users - in this situation?
2) what are the advantages and disadvantages of useing a non-unique UID?

3) currently, their connect trough a zsh, but would it bear any risk to use (fx.) Bash instead?
4) what is generally the reason for the different shell use?

big thanks

/Nicholas
 
Old 06-19-2006, 01:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
1) why on earth would you want to??
2) there are no advantages to trying to use the same UID, it's sick and wrong.
3) bash is fine
4) because different shells do different things
 
Old 06-19-2006, 01:43 AM   #3
nico562
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
1) why on earth would you want to??
2) there are no advantages to trying to use the same UID, it's sick and wrong.
3) bash is fine
4) because different shells do different things

Because while i was makeing a script for adding users, i stumbled over this function (useradd -o), and saw it could ease my work tremendously!

please, i would like to know why its "stick and wrong", i cant really use that response to much - other than you think negative about it - but that doesnt give me any insite on why?
 
Old 06-19-2006, 01:48 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
files are not owned by usernames, they are owned by uid's. if you have two users with the same uid they will be the same person when it comes to file access. they will be bale to edit each others files as if they were there own, without any way of stopping it. I really don't see why your work would be eased by this at all. uid's are assigned on a sequential basis, you have no reason to even know what a users uid ever is.
 
Old 06-19-2006, 01:54 AM   #5
nico562
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
files are not owned by usernames, they are owned by uid's. if you have two users with the same uid they will be the same person when it comes to file access. they will be bale to edit each others files as if they were there own, without any way of stopping it. I really don't see why your work would be eased by this at all. uid's are assigned on a sequential basis, you have no reason to even know what a users uid ever is.
I see, i feel almost stupid now overseeing that.

Tell me more about this "sequential basis", as far a i know, one has to set the UID oneself?
..which is what im finding problematic in my perl script, - that is, generating a nice controlled line of numbers for the UID's.
 
Old 06-19-2006, 02:51 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
useradd will just assign the next uid in the range it is configured to do so. normally this is from 500 upwards. only time i've ever manually picked a uid is when i want to have two identical users accessing a common NFS share etc...
 
Old 06-19-2006, 07:49 AM   #7
nico562
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
useradd will just assign the next uid in the range it is configured to do so. normally this is from 500 upwards. only time i've ever manually picked a uid is when i want to have two identical users accessing a common NFS share etc...
hmm, isnt it possible to enter the range oneself? ive tried looking for it - no luck

/EDIT;

Nevermind, that was a stupid question. Found it in the Man pages (-k option).

Last edited by nico562; 06-19-2006 at 08:08 AM.
 
Old 06-19-2006, 08:47 AM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I never felt the need to change this but, on my FC5 box, it looks like you could adjust the range in /etc/login.defs
Code:
# Min/max values for automatic uid selection in useradd
#
UID_MIN			  500
UID_MAX			60000
 
Old 06-19-2006, 02:41 PM   #9
nico562
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by homey
I never felt the need to change this but, on my FC5 box, it looks like you could adjust the range in /etc/login.defs
Code:
# Min/max values for automatic uid selection in useradd
#
UID_MIN			  500
UID_MAX			60000
well ill' be changeing them, for manageing purposes. i wont go into detail about it
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 02:34 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
what make Slackware unique shanenin Slackware 55 07-09-2004 09:05 AM
Unique Set-up (at least I think it is) wolfhound Linux - Newbie 1 03-17-2004 03:48 PM
Samba - a unique problem cjpsparks Linux - Networking 4 10-02-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration