LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-24-2003, 04:31 PM   #16
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66

I think that is because samba is run as root and therefore has access to write to the files if the owner does (I think this is the way it works).
 
Old 04-24-2003, 05:53 PM   #17
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Any suggestions on how to accomplish what I am attempting?

My book on samba is on its way. heheh

Tarballed
 
Old 04-24-2003, 06:01 PM   #18
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Try setting "writable = no" or chmod the files 444. I think that should work.
 
Old 04-24-2003, 06:02 PM   #19
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Dir will need to be 555. (directories need to be executeable to be read - not sure why, just a fact of life as far as I am concerned)
 
Old 04-30-2003, 12:12 PM   #20
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Alright. Here we go. I just placed orders for our new servers. One of the servers is going to be running RH 8.0 with samba acting as our PDC.

Now, I have done some testing recently in trying to setup samba as a PDC. I found a couple of good tutorials to help me out. However, I am running into a bit of trouble when it comes to actually trying to add computers to the domain.

Right now, I have one server acting as a PDC, running samba 2.2.7. One workstation running Windows 2000.

Let me input some data:

Code:
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   ;Basic inital test settings
   netbios name = smbtest
   workgroup = disneyland

   ;PDC and Master browser settings
   preferred master = yes
   local master = yes
   domain master = yes
   os level = 65

   ;security and logging settings
   security = user
   encrypt passwords = yes
   domain logons = yes

   ;logon paths
   logon path = \\%L\profiles\%u\%m
   logon script = logon.bat

   logon drive = H:

[netlogon]
   path = /home/netlogon
   writable = no
   browsable = no

[profiles]
   path = /home/samba/profiles
   browsable = no
   writable = yes
   create mask = 0600
   directory mask = 0700

[homes]
   read only = yes
   browsable = no
   guest ok = no
   map archive = yes

# server string is the equivalent of the NT Description field
   server string = Samba Server Running %v

   add user script = /usr/sbin/adduser -d /dev/null -g 100 -s /bin/false -M %u
That is my smb.conf file.

Also, when I try and add computer accounts as suggested both in the tutorial and the book (O'Reilly), when I check the passwd file, I do not see the $ at the end of the username.

Any ideas on what could be wrong?

Thanks.

Tarballed
 
Old 04-30-2003, 01:28 PM   #21
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Quick note here.

When I try and join the domain from a Windows 2000 Pro computer, I get a message that says something along the lines of:

"you are using a computer account to try and join the domain. Try using your global account or local account instead."

It is something like that.

Any ideas?

tarballed
 
Old 04-30-2003, 01:58 PM   #22
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I'm affraid that I've never used samba as a PDC yet - I'll help if I can though. (I may be creating one so soon although I don't think it will start as a PDC)

You may be better starting a new thread or looking at:
http://hr.uoregon.edu/davidrl/samba/samba-pdc.html
There is a section of error messages and yours is included:
Quote:
The Account Used is a Computer Account. Use Your Global User Account or Local User Account to Access the Server. This reportedly happens if the machine account information (account, UID, GID) in /etc/passwd does not match its same credentials in /etc/samba/private/smbpasswd. Usually, this is the result of modifying either /etc/passwd or smbpasswd for the machine account, and not sync'ing the changes in both. It can also be caused by using an account name that does not match the NetBIOS name of the Windows machine (thanks to Sherwood Botsford for the info!).
As for adding the accounts take a look at "Adding User and Machine Accounts" in:
http://www.linux-mag.com/cgi-bin/pri...&article=samba

Basicaly I think with the useradd command you must manually add the $ sign ie:
Code:
adduser -g machines -c NTMachine -d /dev/null -s /bin/false -n 'mywin2k$'
Then when adding the machine to samba you use a "-m" switch to tell samba it is a machine and therefore don't need the $ sign:
Code:
smbpasswd -m -a mywin2k

Last edited by david_ross; 04-30-2003 at 02:00 PM.
 
Old 04-30-2003, 02:30 PM   #23
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Thanks for your reply, again.

Looks like I have some research and reading to do.

Once I have it figured out, I will post my results here.

thanks again!

Tarballed
 
Old 04-30-2003, 04:07 PM   #24
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Original Poster
Rep: Reputation: 30
Ok. I was actually able to add a computer to the PDC. However, I am a little confused as to how it actually worked. heheh

Anyways, here is what I did: (If you refer to the IBM tutorial, that is where I was able to successfully add the computer to the PDC)

Ok. Specificall, go to the section in the tutorial called: "Directories, accounts and authentication."

Then go to page 3.

It was not until I did this, did it work:


[root@phoenix root]# /usr/sbin/useradd -g machines -d /dev/null -c "machine id" -s /bin/false machine_name$
[root@phoenix root]# passwd -l machine_name$
Changing password for user machine_name$
Locking password for user machine_name$

[root@phoenix root]# smbpasswd -a -m machine_name
Added user machine_name$

Now, that is the manual way to do things. However, I would like to do the automated approach. I then tried the script:

add user script = /usr/sbin/useradd -d /dev/null -g machines -s /bin/false -M %u


I thought that would work, but not so lucky.

Anyone have any idea on what exactly happened? I am trying to understand this more so I have a much better understanding of what is going on.

I would really be greatful if someone could explain this so I understand.

Thank you.

Tarballed
 
Old 04-30-2003, 04:16 PM   #25
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
A couple of things I can see from what you posted:
1) No $ sign on the adduser script
2) There was no command to add the machine to samba (this may be done by samba I'm not sure - look to see if the user was added to smbpasswd)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 02:33 AM
Samba - Connecting from WinXP Pro to Samba running on Debian critical Linux - Networking 1 02-03-2005 10:36 AM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 06:54 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 02:21 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 06:54 AM

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

All times are GMT -5. The time now is 03:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration