LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   samba - add user script - User account does not exist (https://www.linuxquestions.org/questions/linux-server-73/samba-add-user-script-user-account-does-not-exist-514262/)

itzamecwp 12-28-2006 05:22 AM

samba - add user script - User account does not exist
 
Hi,

Im battling with this one. Im running a Samba (3.0.22) PDC on Ubuntu 6.01. Rather than manually creating user and machine accounts, I want them simply created from a Windows XP/2000 PC as and when they are joined to the domain.

Using the XP PRO Network ID under system properties, I am able to get all the way through to where the users access level is set. On specifying this, I get the "The User account xxxx does not exist".

If I manually setup the user first all goes well and the user and machine login to the domain.

Strangley, the add machine script works and regardless as the the machine name, as long as the user exists, the machine is added automatically.

SMB.CONF

[global]
encrypt passwords = Yes
passdb expand explicit = no
log level = 2
admin users = root
unix charset = ISO8859-1
display charset = ISO8859-1
workgroup = SIGTEST
server string = %h server (Samba, Ubuntu)
interfaces = eth0, 100.100.100.0/24, 127.0.0.0/8
bind interfaces only = Yes
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
name resolve order = wins lmhosts hosts bcast
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
username map = /etc/samba/smbusers

add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null %u
add user script = /usr/sbin/useradd -s /bin/bash -m %u
# -m -g users -G users -s /bin/bash
add user to group script = /usr/sbin/usermod -G %g %u
add group script = /usr/sbin/groupadd %g

delete user from group script = /usr/sbin/groupmod -R %u %g
delete user script = /usr/sbin/userdel -r %u
delete group script = /usr/sbin/groupdel %g
set primary group script = /usr/sbin/usermod -g %g %u

logon script = %U.bat
logon path =
logon drive = H:
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
local master = Yes
dns proxy = No
wins support = Yes
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
idmap uid = 10000-20000
idmap gid = 10000-20000
template homedir = /home/%U
template shell = /bin/bash
create mask = 0600
directory mask = 0700
hosts allow = 100.100.100.0/24, 127.0.0.0/8
printing = cups
cups options = raw
print command =
lpq command = %p
lprm command =
hide special files = Yes
unix password sync = Yes
browseable = No

[netlogon]
path = /home/netlogon
root preexec = /home/netlogon/login.pl %U %L
browseable = No

[homes]
path = /home/%U
valid users = %S
read only = No
inherit permissions = Yes
inherit acls = Yes
inherit owner = Yes
browseable = No

[SHARED]
comment = Secure Shares
path = /SHARED
valid users = @users
read only = No
acl group control = Yes
create mask = 0664
directory mask = 0770
inherit permissions = Yes
inherit acls = Yes
inherit owner = Yes
browseable = Yes

[printers]
comment = Printer Queues
path = /tmp
create mask = 0700
printable = Yes
browseable = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

I would really appreciate some pointers here.

Craig.

xjlittle 01-16-2007 06:23 PM

You will need to use pam_mkhomedir and add the user to the domain with user manager or whatever tool that you use. Only someone with administrator privileges can join a machine to a domain.

itzamecwp 01-18-2007 10:52 PM

Thanks - I will take a look at that.


All times are GMT -5. The time now is 02:21 AM.