Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/07/15 14:27:06
# Global parameters
[global]
workgroup = COLLIN_DOMAIN
netbios name = COLLIN_PDC
log file = /var/log/samba/samba-log.%U
logon drive = F:
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
local master = yes
encrypt passwords = yes
admin users = root
add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
[homes]
read only = No
browseable = No
[Opt]
comment = this is a comment
path = /opt
write list = @bubbledream
read only = No
guest only = Yes
[everyone]
path = /usr/src
guest ok = Yes
[profiles]
comment = Roaming profiles directory
path = /home/%U/samba/profiles
read only = No
create mask = 0600
directory mask = 0700
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
guest ok = yes
writable = no
Logon on to WinXP as "subaruwrx" without password. change from workgroup to domain, login as my linux root account, it say user name could not be found.
- Already did "smbpasswd -a root". But when "useradd root", it say user already exit.
- Already did "smbpasswd -a subaruwrx" and "useradd subaruwrx"
- Also tried the registry hack from this url.
It seems the my roaming profile doesn't works all the while. Its using local profile.
Anyway, I got this error in my samba log.
get_domain_user_groups: primary gid of user [subaruwrx] is not a Domain group !
get_domain_user_groups: You should fix it, NT doesn't like that
Also, when I tried logging in with a new user. It say server cannot locate the roaming profile. Error was something to do with the machine name. Below is my logon path
logon path = \\%L\home\%U\Profile
P.S Please ignore all my previous post. I had them figured out.
I think it could be due to how you joined your XP machine to the domain - you haven't told us what version of Samba you're using but for Samba 2.2.x you need a line in smb.conf like:
for Samba 3.x I think there's a parameter called add machine script (but I'm not sure so check!). This then sets the machine account up automatically if it doesn't exist and is what the Samba docs recommend.
What you could do is to remove the XP machine from the domain and then rejoin using the XP join a domain stuff. It will ask for a user name and password which will have to be your Samba user name and password and also it will ask for an administrator name and password to enable you to join your machine to the domain. This has to be theSamba user root - so you have to use 'smbpasswd -a -e root' on the linux box but choose a password totally different from your linux root password for security reasons!
If successful your XP box will say it's joined the domain and you're good to go.
I'm afraid I can't tell you exactly how in XP to join the domain because my XP machines are XP Home which don't have the domain stuff but I've don this with W2K Pro on my network using Samba 2.2.8a as PDC.
Originally posted by andrewdodsworth I think it could be due to how you joined your XP machine to the domain - you haven't told us what version of Samba you're using but for Samba 2.2.x you need a line in smb.conf like:
for Samba 3.x I think there's a parameter called add machine script (but I'm not sure so check!). This then sets the machine account up automatically if it doesn't exist and is what the Samba docs recommend.
What you could do is to remove the XP machine from the domain and then rejoin using the XP join a domain stuff. It will ask for a user name and password which will have to be your Samba user name and password and also it will ask for an administrator name and password to enable you to join your machine to the domain. This has to be theSamba user root - so you have to use 'smbpasswd -a -e root' on the linux box but choose a password totally different from your linux root password for security reasons!
If successful your XP box will say it's joined the domain and you're good to go.
I'm afraid I can't tell you exactly how in XP to join the domain because my XP machines are XP Home which don't have the domain stuff but I've don this with W2K Pro on my network using Samba 2.2.8a as PDC.
Good luck.
I'm using Samba Version 3.0.3-5.
When I log on, it say cannot find my roaming profile. Error was "Network path not found"
Thought of redoing all over again including adding of the users, groups.
I heard that you need to add the machine name of the client os, with a & at the back of the machine name.
So do I use your add user script to do that or the below add machine script?
Have a look at this document - it's a walk through setting up whatever you want on Samba 3 but it's got such a lot of good stuff in it that it's an invaluable reference. The Appendix has lots of tips and tricks - including dos and don'ts on joining XP to a domain. http://samba.org/samba/docs/man/Samba-Guide/
I had the exact same problem, (specified user does not exist) and here's what I did to fix it. I found that my machine name "test2k" without the quotes, was already set up as a samba user (I was fiddling with it for quite a while) Once I removed it, and tried to re-add my machine to the domain, it worked fine. Just make sure you have the add script line be something like "add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u" without the quotes. I mistakenly made it "add user script" instead of machine, and that was another problem I ran into. Hope that helps you out!! If you have ANY problems or questions, feel free to post and let me know! Linux is worth it, it just takes some time getting it all set up the way you want.
Originally posted by tbeehler I had the exact same problem, (specified user does not exist) and here's what I did to fix it. I found that my machine name "test2k" without the quotes, was already set up as a samba user (I was fiddling with it for quite a while) Once I removed it, and tried to re-add my machine to the domain, it worked fine. Just make sure you have the add script line be something like "add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u" without the quotes. I mistakenly made it "add user script" instead of machine, and that was another problem I ran into. Hope that helps you out!! If you have ANY problems or questions, feel free to post and let me know! Linux is worth it, it just takes some time getting it all set up the way you want.
Travis Beehler
If I were to put the add machine script into my smb.conf, how does it work automatically? Whenever it detect a new machine, it will auto add it?
And now I want to manually add the machine, I use this command? -> adduser -n -g machines -c Machine -d /dev/null -s /bin/false "machinename"
Not a problem. When you put that line in your smb.conf file, it will automatically add the machine name to the database if it can't find it when you go to add it to the domain. It won't add a machine to it if the machine is merely on the network. It's VERY handy. Trust me on this one (I have about 40 users and climbing.) I noticed a lot of people use this command, but do it as the add user script instead of machine. I don't think that's correct. At least according to the docs. And yes, I believe that you can manually type out that command and it will put the machine name in if you want to go that route. You will still have to manually add the person through the smbpasswd command, but having that line in the smb.conf file will save you a step. On a side note, I have webmin installed on that machine and you can configure it so that when you add a normal user, it will automatically create them with the smbpasswd command for you. You can make linux do all sorts of neat things for you automatically if you get it config'd right (depending on how high end you want to go. ) I had a samba pdc set up a while back and just recently got back into it as I want to remove windows 2000 server from my server farm. This is my last machine that I can convert. I have 3 others that HAVE to be windows. Oh well, 13 out of 16 server's isn't bad. The nice thing is I can count my linux machine uptimes in terms of months instead of days or hours. (I had to shut them down when I got a new rack, so that doesn't count. ) Anyways, if you have ANY problems or questions, feel free to give us a buzz!
1) useradd client account, smbpasswd -a account
a - What group do we add them to? Does it matters?
2) Adding of machine account
a - Do I need to add it to the samba? (Using smbpasswd)
b - Again, does it matter if what group i assign it to? Or both client and machine account must be in same group?
3) Do we need to create the directory/folder manually and assign the permission for profiles and netlogon folders?
4) Whats the difference between create mode and create mask?
1: You can add them to any group you'd like or create your own groups.
2: A. If you have that useradd line in the previous posts, you won't have to add it through smbpasswd. I think that it won't let you join the domain if you don't have that line in there OR if you haven't added it manually prior to trying to join the domain. B. The client and machine accounts can be in different groups. (Mine are. )
3: You'll have to create the folder and share of netlogon for logon scripts to run at logon. If you have set up groups, it's much easier to assign permissions to this folder/share. The profiles option: I think you have to create a share that's accessable and writable to your users so that this may be automatically created with the one \\%N\%p or something like that. I don't remember the syntax of it off the top of my head.
4: I don't know the answer to that one, but I'll check my samba book when I get to work in the morning. I believe that the create mode is when you create a new file or folder, it will give it certain permissions that you specify. But that's a stab in the dark and I'll have to check that in the morning. Don't quote me on it.
Anyways, I'm off to bed. I'll check on you in about 9 hours or so and see how things are coming along. Have a good night!
hmm........ I tried re-adding the users and machines but I can't join the domain w/o first adding the machine. I thought the add machine script supposed to add new machine automatically?
Anyway, I still can't get my roaming profile to work. It still doesn't appear in the Samba Server.
smb.conf as below.
Quote:
# Global parameters
[global]
workgroup = COLLIN_DOMAIN
netbios name = COLLIN_PDC
server string = %h server (Samba %v)
encrypt passwords = yes
security = user
add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
Originally posted by subaruwrx hmm........ I tried re-adding the users and machines but I can't join the domain w/o first adding the machine. I thought the add machine script supposed to add new machine automatically?
Anyway, I still can't get my roaming profile to work. It still doesn't appear in the Samba Server.
smb.conf as below.
Even chmod 777 /home/samba
When joining the domain on the Windows machine - when asked for the name of the administrator user that had permissions to join the domain, what user name did you use?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.