LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2007, 01:55 PM   #1
jnagle
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
Question User IDs for new users in wrong range


I've inherited the support of a RedHat server running Samba. The person that set up the system knows and understands Linux quite well but left our employ for bigger and better; I know very litte about Linux. Everything is done via CLI - no xWindows.
Some of the more recently added users have reported an inability to access the Samba shares. The discovered resolution is to reset their password both in passwd and smbpasswd files; makes no difference if I change to a new password or simply retype the old one. Once done, the user reboots their WinXP system and can then login in and access the mapped drives to the Samba shares. In trying to determine the cause, I noticed that the user ID's for these users are in the 1200 range in stead of the 500+ range used by the older user ID's. My question is two fold - Can I safely change the user ID's to a different number and if so, how? AND Is there a config file somewhere that dictates the range of ID's used for the creation of accounts by type such as machine accounts are 1200 - 1500, user accounts 500 - 900? If so, can you tell me where to find it? Thx
 
Old 11-06-2007, 02:23 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have a look in /etc/login.defs for the UID_MIN, UID_MAX, GID_MIN and GID_MAX values - they should let you control the user id and group id values. I can't imagine why the user id would be the cause of the problem, but I'm a long, long way from knowing everything

You can change a user id in /etc/passwd, but there are other things that need to be done. The files /etc/shadow and /etc/group will have entries that need to be updated. Also, you should search for files owned by the old user id (the obvious ones are under /home) with the find command.

If you don't have a box to practice on, create a temporary user account that has a home directory and owns some files in other locations on the file system. Use find / -uid 1200 (or whatever the user id is) to locate the files the user owns and use chown to change the ownership.
 
Old 11-06-2007, 03:23 PM   #3
jnagle
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Original Poster
Rep: Reputation: 0
login.def is present but empty. My thought process could be faulty, but the user logins that are sporadically failing have user ID's that match the ID's assigned to machine accounts - see excerpt from passwd file:

dlarson:x:593:711eb Larson:/home/dlarson:/sbin/nologin
pbechik:x:594:710:Pam Bechik:/home/pbechik:/sbin/nologin
lwestberg:x:1205:710:Lara Westberg:/home/lwestberg:/sbin/nologin
atallon:x:1206:700:Angie Tallon:/home/atallon:/sbin/nologin
sjohnson:x:1207:703:Shelley Johnson:/home/sjohnson:/sbin/nologin
comsw05$:x:1207:300:workstation:/dev/null:/bin/false

Note how the UID's are 593, 594 and then jump to 1205, 1206, etc.? The machine account comsw05 also has uses 1207 and the user sjohnson/UID 1207 is the most recent user to encounter the failed login problem. I neglected to mention in my original post that the "permanent" resolution I've come up with is to add a machine account line similar to what you see for comsw05 with a UID that matches the actual user profile for that specific machine. For example, in the passwd file I've added the line:

is002$:x:1206:300:workstation:/dev/null:/bin/false

which ended the problem from occurring for user atallon/UID 1206.

Maybe I have more then one problem on my hands and can't see it because I am unfamiliar with the O/S.....
 
Old 11-06-2007, 05:26 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
As far as I know, having more than one user with the same userid just means that each user has access to the other's files (at the same privilege as the other user). I don't know what might be happening unless Samba needs to look up the userid in /etc/passwd (or /etc/shadow), gets the wrong one and can't authenticate. That's a guess though - I don't have enough experience with it to know if that's the case.

There might be more info in Samba's logs (usually /var/log/samba/*). Apart from that, unless there was an important reason not to, I'd be using unique user ids. Also, have you tried grep'ing through /etc for user id settings?
 
  


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
User IDs DarReNz Solaris / OpenSolaris 4 08-16-2006 06:13 AM
Linux User IDs ? xwastedmindx Linux - General 2 11-12-2003 07:52 PM
remap? user ids? GATTACA Linux - Networking 3 10-15-2003 01:15 PM
separate login IDs/passwords for email and users zthomasz Linux - Security 3 08-01-2003 11:35 AM
separate login IDs/passwords for email and users zthomasz Linux - Newbie 3 07-29-2003 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:05 PM.

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