Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-17 Thread J. Echter
sorry, forgot to add my smb.conf

[global]
   printing = bsd
   workgroup = workgroup
   map to guest = bad user
   domain logons = yes
   add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
/bin/false
   delete user script = /usr/sbin/userdel -r '%u'
   add group script = /usr/sbin/groupadd '%g'
   delete group script = /usr/sbin/groupdel '%g'
   add user to group script = /usr/sbin/usermod -G '%g' '%u'
   add machine script = /usr/sbin/useradd -s /bin/false -d
/var/lib/nobody '%u' -g machines
   logon path = \\%L\profile\%U
   logon script = %U.bat
   hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/

[homes]
   comment = Home Directories
   browseable = no
   writeable = yes
#   valid users = %S

[profile]
   comment = Profildateien
   path = /home/samba/profile
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes
   profile acls = yes

[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   guest ok = yes
   writeable = no
   share modes = no

failure was the commented # line.

cheers.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-17 Thread J. Echter
Am 16.03.2011 18:00, schrieb TAKAHASHI Motonobu:
> From: "J. Echter" 
> Date: Wed, 16 Mar 2011 17:34:35 +0100
>
>>> You should show us enough information for us to re-produce such as
>>> all content of smb.conf and related settings:
>>>
>>> In my lab, profile dir is successfully created. My env is...
> (snip)
>
>> smb.conf
> (snip)
>
>> ls -lR /home/samba/profile
> (snip)
>
> At first you had better try a simple settings like me.
>
> To look at your smb.conf, I tried with the smb.conf below:
>
> -
> [global]
>   workgroup = SAMBA
>   domain logons = yes
>   add machine script = useradd %u
>   map to guest = bad user
>
>   logon path = \\%L\profiles\%U
>   hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/
>
> [homes]
>   writeable = yes
>   browseable = no
>
> [profiles]
>   path = /var/lib/samba/shares/profiles
>   guest ok = yes
>   browseable = no
>   create mask = 0600
>   directory mask = 0700
>   writeable = yes
>   profile acls = yes
> -
>
> and although still my user can create profile dirs and files...
>
> ---
> TAKAHASHI Motonobu 
>
>
>
>
>
Hi,

i have reduced my smb.conf a bit :) now it works.

is there any option you would recommend to set for an PDC?


Greetings and many many thanks for your hints.

juergen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter
Am 16.03.2011 18:02, schrieb t...@tms3.com:
> You should show us enough information for us to re-produce such as
>>
>>>
>>> all content of smb.conf and related settings:
>>>
>>> In my lab, profile dir is successfully created. My env is...
>>>
>>> - Debian lenny (hostname is "lenny5") + self-compiled Samba 3.5.6
>>> - my smb.conf and shares
>>>
>>> ---
>>> [global]
>>>workgroup = SAMBA
>>>domain logons = yes
>>>add machine script = useradd %u
>>>map to guest = bad user
>>>
>>>logon path = \\lenny5\profiles\%U
>>>
>>> [homes]
>>>writeable = yes
>>>browseable = no
>>>
>>> [profiles]
>>>path = /var/lib/samba/shares/profiles
>>>guest ok = yes
>>>browseable = no
>>>create mask = 0600
>>>directory mask = 0700
>>>writeable = yes
>>> ---
>>>
>>> # ls -lR /var/lib/samba
>>> /var/lib/samba/:
>>> total 4
>>> drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares
>>>
>>> /var/lib/samba/shares:
>>> total 16
>>> drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles
>>>
>>> - Created a user:
>>>
>>> # useradd -d /var/home/test01 test01
>>> # smbpasswd -a test01
>>> # pdbedit -v test01
>>> ...
>>> Profile Path: \\lenny5\profiles\test01
>>> ...
>>>
>>>
>>> - When I logon as test01 from Windows XP workstation which is already
>>>joined to the "SAMBA" domain and logoff, profiles are created
>>> like:
>>>
>>> # ls -lR /var/lib/samba
>>> total 4
>>> drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares
>>>
>>> /var/lib/samba/shares:
>>> total 16
>>> drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles
>>>
>>> /var/lib/samba/shares/profiles:
>>> total 16
>>> drwx-- 13 test01 test01 4096 2011-03-17 01:08 test01
>>>
>>> /var/lib/samba/shares/profiles/test01:
>>> total 568
>>> drwx-- 3 test01 test01   4096 2010-10-11 01:10 Start Menu
>>> drwx-- 2 test01 test01   4096 2010-10-11 01:10 Desktop
>>> drwx-- 4 test01 test01   4096 2011-03-17 01:08 Application Data
>>> drwx-- 2 test01 test01   4096 2010-10-11 01:18 Cookies
>>> drwx-- 3 test01 test01   4096 2011-03-17 01:08 Favorites
>>> drwx-- 4 test01 test01   4096 2011-03-17 01:08 My Documents
>>> drwx-- 2 test01 test01   4096 2010-10-11 01:10 NetHood
>>> -rw--- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
>>> -rw--- 1 test01 test01   1024 2011-03-17 01:08 ntuser.dat.LOG
>>> -rw--- 1 test01 test01270 2011-03-17 01:08 ntuser.ini
>>> ...
>>>
>>> ---
>>> TAKAHASHI Motonobu
>> smb.conf
>>
>> [global]
>>printing = bsd
>>netbios name = PDC
>>server string = PDC (%h)
>>workgroup = workgroup
>>interfaces = eth0,lo
>>security = user
>>encrypt passwords = true
>>passdb backend = tdbsam
>>obey pam restrictions = yes
>>unix password sync = yes
>>passwd program = /usr/bin/passwd %u
>>passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
>> *Retype\snew\sUNIX\spassword:* %n\n .
>>local master = yes
>>preferred master = yes
>>os level = 200
>>domain master = yes
>>domain logons = yes
>>add user script = /usr/sbin/useradd -m '%u' -g ntusers -G
>> ntusers -s
>> /bin/false
>>delete user script = /usr/sbin/userdel -r '%u'
>>add group script = /usr/sbin/groupadd '%g'
>>delete group script = /usr/sbin/groupdel '%g'
>>delete group script = /usr/sbin/groupdel '%g'
>>add user to group script = /usr/sbin/usermod -G '%g' '%u'
>>add machine script = /usr/sbin/useradd -s /bin/false -d
>> /var/lib/nobody '%u' -g machines
>>logon path = \\%L\profile\%U
>>logon drive = h:
>>logon script = %U.bat
>>profile acls = yes
>>hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/
>>wins support = no
>>log file = /var/log/samba/log.%m
>>max log size = 1000
>>syslog = 0
>>log level = 12
>>panic action = /usr/share/samba/panic-action %d
>>use sendfile = yes
>
> Where is your profile path?
>
>
on /files/samba --> symlinked to /home/samba
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread tms3

You should show us enough information for us to re-produce such as




all content of smb.conf and related settings:

In my lab, profile dir is successfully created. My env is...

- Debian lenny (hostname is "lenny5") + self-compiled Samba 3.5.6
- my smb.conf and shares

---
[global]
   workgroup = SAMBA
   domain logons = yes
   add machine script = useradd %u
   map to guest = bad user

   logon path = \\lenny5\profiles\%U

[homes]
   writeable = yes
   browseable = no

[profiles]
   path = /var/lib/samba/shares/profiles
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes
---

# ls -lR /var/lib/samba
/var/lib/samba/:
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

- Created a user:

# useradd -d /var/home/test01 test01
# smbpasswd -a test01
# pdbedit -v test01
...
Profile Path: \\lenny5\profiles\test01
...


- When I logon as test01 from Windows XP workstation which is already
   joined to the "SAMBA" domain and logoff, profiles are created 
like:


# ls -lR /var/lib/samba
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

/var/lib/samba/shares/profiles:
total 16
drwx-- 13 test01 test01 4096 2011-03-17 01:08 test01

/var/lib/samba/shares/profiles/test01:
total 568
drwx-- 3 test01 test01   4096 2010-10-11 01:10 Start Menu
drwx-- 2 test01 test01   4096 2010-10-11 01:10 Desktop
drwx-- 4 test01 test01   4096 2011-03-17 01:08 Application Data
drwx-- 2 test01 test01   4096 2010-10-11 01:18 Cookies
drwx-- 3 test01 test01   4096 2011-03-17 01:08 Favorites
drwx-- 4 test01 test01   4096 2011-03-17 01:08 My Documents
drwx-- 2 test01 test01   4096 2010-10-11 01:10 NetHood
-rw--- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
-rw--- 1 test01 test01   1024 2011-03-17 01:08 ntuser.dat.LOG
-rw--- 1 test01 test01270 2011-03-17 01:08 ntuser.ini
...

---
TAKAHASHI Motonobu

smb.conf

[global]
   printing = bsd
   netbios name = PDC
   server string = PDC (%h)
   workgroup = workgroup
   interfaces = eth0,lo
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
   local master = yes
   preferred master = yes
   os level = 200
   domain master = yes
   domain logons = yes
   add user script = /usr/sbin/useradd -m '%u' -g ntusers -G 
ntusers -s

/bin/false
   delete user script = /usr/sbin/userdel -r '%u'
   add group script = /usr/sbin/groupadd '%g'
   delete group script = /usr/sbin/groupdel '%g'
   delete group script = /usr/sbin/groupdel '%g'
   add user to group script = /usr/sbin/usermod -G '%g' '%u'
   add machine script = /usr/sbin/useradd -s /bin/false -d
/var/lib/nobody '%u' -g machines
   logon path = \\%L\profile\%U
   logon drive = h:
   logon script = %U.bat
   profile acls = yes
   hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/
   wins support = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   log level = 12
   panic action = /usr/share/samba/panic-action %d
   use sendfile = yes


Where is your profile path?

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread TAKAHASHI Motonobu
From: "J. Echter" 
Date: Wed, 16 Mar 2011 17:34:35 +0100

> > You should show us enough information for us to re-produce such as
> > all content of smb.conf and related settings:
> >
> > In my lab, profile dir is successfully created. My env is...

(snip)

> smb.conf

(snip)

> ls -lR /home/samba/profile

(snip)

At first you had better try a simple settings like me.

To look at your smb.conf, I tried with the smb.conf below:

-
[global]
  workgroup = SAMBA
  domain logons = yes
  add machine script = useradd %u
  map to guest = bad user

  logon path = \\%L\profiles\%U
  hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/

[homes]
  writeable = yes
  browseable = no

[profiles]
  path = /var/lib/samba/shares/profiles
  guest ok = yes
  browseable = no
  create mask = 0600
  directory mask = 0700
  writeable = yes
  profile acls = yes
-

and although still my user can create profile dirs and files...

---
TAKAHASHI Motonobu 





-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 17:21, schrieb TAKAHASHI Motonobu:


- Created a user:

# useradd -d /var/home/test01 test01
# smbpasswd -a test01
# pdbedit -v test01
...
Profile Path: \\lenny5\profiles\test01
...


- When I logon as test01 from Windows XP workstation which is already
   joined to the "SAMBA" domain and logoff, profiles are created like:

# ls -lR /var/lib/samba
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

/var/lib/samba/shares/profiles:
total 16
drwx-- 13 test01 test01 4096 2011-03-17 01:08 test01

/var/lib/samba/shares/profiles/test01:
total 568
drwx-- 3 test01 test01   4096 2010-10-11 01:10 Start Menu
drwx-- 2 test01 test01   4096 2010-10-11 01:10 Desktop
drwx-- 4 test01 test01   4096 2011-03-17 01:08 Application Data
drwx-- 2 test01 test01   4096 2010-10-11 01:18 Cookies
drwx-- 3 test01 test01   4096 2011-03-17 01:08 Favorites
drwx-- 4 test01 test01   4096 2011-03-17 01:08 My Documents
drwx-- 2 test01 test01   4096 2010-10-11 01:10 NetHood
-rw--- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
-rw--- 1 test01 test01   1024 2011-03-17 01:08 ntuser.dat.LOG
-rw--- 1 test01 test01270 2011-03-17 01:08 ntuser.ini
...

---
TAKAHASHI Motonobu

sorry again, something missing... i have to handle ringing telephones...

i added a user like you did

pdbedit -v bla

Profile Path: \\pdc\profile\bla

login as this user and logout again, no profile dir is created.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 17:21, schrieb TAKAHASHI Motonobu:

From: "J. Echter"
Date: Wed, 16 Mar 2011 11:09:59 +0100


i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

Any hints on that?

You should show us enough information for us to re-produce such as
all content of smb.conf and related settings:

In my lab, profile dir is successfully created. My env is...

- Debian lenny (hostname is "lenny5") + self-compiled Samba 3.5.6
- my smb.conf and shares

---
[global]
   workgroup = SAMBA
   domain logons = yes
   add machine script = useradd %u
   map to guest = bad user

   logon path = \\lenny5\profiles\%U

[homes]
   writeable = yes
   browseable = no

[profiles]
   path = /var/lib/samba/shares/profiles
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes
---

# ls -lR /var/lib/samba
/var/lib/samba/:
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

- Created a user:

# useradd -d /var/home/test01 test01
# smbpasswd -a test01
# pdbedit -v test01
...
Profile Path: \\lenny5\profiles\test01
...


- When I logon as test01 from Windows XP workstation which is already
   joined to the "SAMBA" domain and logoff, profiles are created like:

# ls -lR /var/lib/samba
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

/var/lib/samba/shares/profiles:
total 16
drwx-- 13 test01 test01 4096 2011-03-17 01:08 test01

/var/lib/samba/shares/profiles/test01:
total 568
drwx-- 3 test01 test01   4096 2010-10-11 01:10 Start Menu
drwx-- 2 test01 test01   4096 2010-10-11 01:10 Desktop
drwx-- 4 test01 test01   4096 2011-03-17 01:08 Application Data
drwx-- 2 test01 test01   4096 2010-10-11 01:18 Cookies
drwx-- 3 test01 test01   4096 2011-03-17 01:08 Favorites
drwx-- 4 test01 test01   4096 2011-03-17 01:08 My Documents
drwx-- 2 test01 test01   4096 2010-10-11 01:10 NetHood
-rw--- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
-rw--- 1 test01 test01   1024 2011-03-17 01:08 ntuser.dat.LOG
-rw--- 1 test01 test01270 2011-03-17 01:08 ntuser.ini
...

---
TAKAHASHI Motonobu

smb.conf

[global]
   printing = bsd
   netbios name = PDC
   server string = PDC (%h)
   workgroup = workgroup
   interfaces = eth0,lo
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n 
*Retype\snew\sUNIX\spassword:* %n\n .

   local master = yes
   preferred master = yes
   os level = 200
   domain master = yes
   domain logons = yes
   add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s 
/bin/false

   delete user script = /usr/sbin/userdel -r '%u'
   add group script = /usr/sbin/groupadd '%g'
   delete group script = /usr/sbin/groupdel '%g'
   delete group script = /usr/sbin/groupdel '%g'
   add user to group script = /usr/sbin/usermod -G '%g' '%u'
   add machine script = /usr/sbin/useradd -s /bin/false -d 
/var/lib/nobody '%u' -g machines

   logon path = \\%L\profile\%U
   logon drive = h:
   logon script = %U.bat
   profile acls = yes
   hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/
   wins support = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   log level = 12
   panic action = /usr/share/samba/panic-action %d
   use sendfile = yes

[homes]
   comment = Home Directories
   browseable = no
   valid users = %S
   writeable = yes
   create mode = 0600
   directory mode = 0700

[profile]
   comment = Profildateien
   path = /home/samba/profile
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes

[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   guest ok = yes
   writeable = no
   share modes = no


ls -lR /home/samba/profile
/home/samba/profile:
total 60
drwx-- 16 info  root4096 Mar 16 16:48 info
drwx-- 15 root  root4096 Oct 28 11:10 root

all manually added users are logged in fine, and all get their profile 
dir loaded from pdc.



thanks, and greetings.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread TAKAHASHI Motonobu
From: "J. Echter" 
Date: Wed, 16 Mar 2011 11:09:59 +0100

> i have a Samba PDC (no LDAP) and added add user script to my config.
> 
> I can create the user with no problems, login is possible but the 
> /home/samba/profile/user dir is not created.
> 
> Any hints on that?

You should show us enough information for us to re-produce such as 
all content of smb.conf and related settings:

In my lab, profile dir is successfully created. My env is...

- Debian lenny (hostname is "lenny5") + self-compiled Samba 3.5.6
- my smb.conf and shares

---
[global]
  workgroup = SAMBA
  domain logons = yes
  add machine script = useradd %u
  map to guest = bad user

  logon path = \\lenny5\profiles\%U

[homes]
  writeable = yes
  browseable = no

[profiles]
  path = /var/lib/samba/shares/profiles
  guest ok = yes
  browseable = no
  create mask = 0600
  directory mask = 0700
  writeable = yes
---

# ls -lR /var/lib/samba
/var/lib/samba/:
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

- Created a user:

# useradd -d /var/home/test01 test01
# smbpasswd -a test01
# pdbedit -v test01
...
Profile Path: \\lenny5\profiles\test01
...


- When I logon as test01 from Windows XP workstation which is already
  joined to the "SAMBA" domain and logoff, profiles are created like:

# ls -lR /var/lib/samba
total 4
drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares

/var/lib/samba/shares:
total 16
drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles

/var/lib/samba/shares/profiles:
total 16
drwx-- 13 test01 test01 4096 2011-03-17 01:08 test01

/var/lib/samba/shares/profiles/test01:
total 568
drwx-- 3 test01 test01   4096 2010-10-11 01:10 Start Menu
drwx-- 2 test01 test01   4096 2010-10-11 01:10 Desktop
drwx-- 4 test01 test01   4096 2011-03-17 01:08 Application Data
drwx-- 2 test01 test01   4096 2010-10-11 01:18 Cookies
drwx-- 3 test01 test01   4096 2011-03-17 01:08 Favorites
drwx-- 4 test01 test01   4096 2011-03-17 01:08 My Documents
drwx-- 2 test01 test01   4096 2010-10-11 01:10 NetHood
-rw--- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
-rw--- 1 test01 test01   1024 2011-03-17 01:08 ntuser.dat.LOG
-rw--- 1 test01 test01270 2011-03-17 01:08 ntuser.ini
...

---
TAKAHASHI Motonobu 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 16:55, schrieb Bruce Richardson:

On Wed, Mar 16, 2011 at 12:01:52PM +, Bruce Richardson wrote:

What do you have in your "logon path" setting in smb.conf?

You never answered this question.  You don't need to have anything
there, because it defaults to "\\%N\%U\profile", but if you do have
something there, what is it?


sorry,

logon path = \\%L\profile\%U

Are you sure you have actually activated domain logins?  It is possible
that you have simply set up a stand-alone file server.  For the PDC to
be working properly, you need

security = user
 domain master = yes
 domain logons = yes


this is all set.

if i add my users manually (adduser, make profile dir), it works.

i also set the permissions to the regarding testuser user profile dir.

drwx--  2 testerroot4096 Mar 16 14:41 tester

greetings.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Bruce Richardson
On Wed, Mar 16, 2011 at 12:01:52PM +, Bruce Richardson wrote:
> 
> What do you have in your "logon path" setting in smb.conf?

You never answered this question.  You don't need to have anything
there, because it defaults to "\\%N\%U\profile", but if you do have
something there, what is it?

Are you sure you have actually activated domain logins?  It is possible
that you have simply set up a stand-alone file server.  For the PDC to
be working properly, you need 

security = user
domain master = yes
domain logons = yes

-- 
Bruce

A problem shared brings the consolation that someone else is now
feeling as miserable as you.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Bruce Richardson
On Wed, Mar 16, 2011 at 04:17:05PM +0100, J. Echter wrote:
> Am 16.03.2011 13:01, schrieb Bruce Richardson:
> >On Wed, Mar 16, 2011 at 12:16:52PM +0100, J. Echter wrote:
> >>no, i want to have a profile dir created when a new created user
> >>logs in. that's it. :)
> >
> >If you create these directories manually and then a user logs in, does
> >the user's profile information then appear in their profile directory?
> >
> sorry didn't mention this, nothing is copied to the manually added dir.

Does the manually added dir have the correct ownership?  Has it been
chown-ed to the right user and do they have write access?  If the answer
to those questions yes but nothing is being copied up, then your problem
is that the user workstations are not looking in the correct place.
Either your domain controller is not advertising the correct location,
or it isn't advertising *any* location for profiles.

-- 
Bruce

I see a mouse.  Where?  There, on the stair.  And its clumsy wooden
footwear makes it easy to trap and kill.  -- Harry Hill
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 13:01, schrieb Bruce Richardson:

On Wed, Mar 16, 2011 at 12:16:52PM +0100, J. Echter wrote:

no, i want to have a profile dir created when a new created user
logs in. that's it. :)


If you create these directories manually and then a user logs in, does
the user's profile information then appear in their profile directory?


sorry didn't mention this, nothing is copied to the manually added dir.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 13:01, schrieb Bruce Richardson:

On Wed, Mar 16, 2011 at 12:16:52PM +0100, J. Echter wrote:

no, i want to have a profile dir created when a new created user
logs in. that's it. :)

Well, as long as you have the correct acls on the share and permissons
on the directory, the user's workstation should try to create the
user directory on the profiles share when the user first logs in.  As
far as I can see, your share definition and directory permissions are
sufficient.


What do you have in your "logon path" setting in smb.conf?

And can you see anything in the logs?


[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   guest ok = yes
   writeable = no
   share modes = no

imho nothing belongs to the problem. i increased log level = 12 meanwhile


in my setup it doesnt get created.

permission:

drwxrwxrwx  4 root   root4096 Feb 12 10:51 samba

Um, if that's the /home/samba directory from your
/home/samba/profile/%username profile path, then you've set the
permissions there insecurely; ordinary users don't need to be creating
directories in /home/samba, so you shouldn't need any more than 755 (or
even 751) permissions there.


drwxrwxrwx 16 root   root   4096 Mar 16 11:50 profile

Assuming that is /home/samba/profile, then I would recommend you change
the permissions from 777 to 1777.  It's a minor point and doesn't have
anything to do with your problem.

If you create these directories manually and then a user logs in, does
the user's profile information then appear in their profile directory?


permissions are set :)

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Bruce Richardson
On Wed, Mar 16, 2011 at 11:21:42AM +0100, Marco Ciampa wrote:
> 
> IMHO you have to create it with a script.
> In that script you will create the user (with useradd) and then the profile 
> dir...

I think it is probably a bad idea to do this with a script unless you
have some good reason to need it.  The auto-creation of the directory
shows you that profiles are working properly.

-- 
Bruce

I unfortunately do not know how to turn cheese into gold.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Bruce Richardson
On Wed, Mar 16, 2011 at 12:16:52PM +0100, J. Echter wrote:
> no, i want to have a profile dir created when a new created user
> logs in. that's it. :)

Well, as long as you have the correct acls on the share and permissons
on the directory, the user's workstation should try to create the
user directory on the profiles share when the user first logs in.  As
far as I can see, your share definition and directory permissions are
sufficient.


What do you have in your "logon path" setting in smb.conf?

And can you see anything in the logs?

> 
> in my setup it doesnt get created.
> 
> permission:
> 
> drwxrwxrwx  4 root   root4096 Feb 12 10:51 samba

Um, if that's the /home/samba directory from your
/home/samba/profile/%username profile path, then you've set the
permissions there insecurely; ordinary users don't need to be creating
directories in /home/samba, so you shouldn't need any more than 755 (or
even 751) permissions there.

> drwxrwxrwx 16 root   root   4096 Mar 16 11:50 profile

Assuming that is /home/samba/profile, then I would recommend you change
the permissions from 777 to 1777.  It's a minor point and doesn't have
anything to do with your problem.

If you create these directories manually and then a user logs in, does
the user's profile information then appear in their profile directory?

-- 
Bruce

Explota!: miles de lemmings no pueden estar equivocados.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

thats what i did.

maybe there's something else wrong with my profiles definition in this case?

[profile]
   comment = Profildateien
   path = /home/samba/profile
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes
   root preexec = /usr/local/bin/mkprofiles.sh %u %g


Am 16.03.2011 12:16, schrieb Wasil:

You must add  "root preexec" to the Section [profiles]
my section [profiles]:

comment = Network Profiles Service
#path = %H
path = /data2/profiles
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
write list = @DomainUsers @root
root preexec = /usr/local/bin/mkprofile.sh %u %g



Wed, 16 Mar 2011 12:04:40 +0100 письмо от "J. 
Echter":


Am 16.03.2011 11:33, schrieb Wasil:

Hi
You must have something like this:

in smb.conf^
[profiles]
.
root preexec = /usr/local/bin/mkprofile.sh %u %g
   

mkprofile.sh:

#!/bin/sh
PROFILE=/data2/profiles/$1
if [ ! -e $PROFILE ]; then
mkdir -pm700 $PROFILE
chown $1:$2 $PROFILE
fi

Wed, 16 Mar 2011 11:09:59 +0100 письмо от "J.

Echter":

Hi,

i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

Any hints on that?

script commands i added:

add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
/bin/false
delete user script = /usr/sbin/userdel -r '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/usermod -G '%g' '%u'
add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody
'%u' -g machines


this is running on Ubuntu 10.04-LTS server


greetings

Juergen.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Hi, thanks for the hint.

but the profile dir doesn't get created.

i edited the path in the script and gave it chmod u+x (to be sure :) )

still nothing created.

if i run the script by hand it works.


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Wasil
You must add  "root preexec" to the Section [profiles]
my section [profiles]:

comment = Network Profiles Service
#path = %H
path = /data2/profiles
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
write list = @DomainUsers @root
root preexec = /usr/local/bin/mkprofile.sh %u %g
 


Wed, 16 Mar 2011 12:04:40 +0100 письмо от "J. Echter" 
:

> Am 16.03.2011 11:33, schrieb Wasil:
> > Hi
> > You must have something like this:
> >
> > in smb.conf^
> > [profiles]
> > .
> > root preexec = /usr/local/bin/mkprofile.sh %u %g
> >   
> >
> > mkprofile.sh:
> >
> > #!/bin/sh
> > PROFILE=/data2/profiles/$1
> > if [ ! -e $PROFILE ]; then
> > mkdir -pm700 $PROFILE
> > chown $1:$2 $PROFILE
> > fi
> >
> > Wed, 16 Mar 2011 11:09:59 +0100 письмо от "J.
> Echter":
> >
> >> Hi,
> >>
> >> i have a Samba PDC (no LDAP) and added add user script to my config.
> >>
> >> I can create the user with no problems, login is possible but the
> >> /home/samba/profile/user dir is not created.
> >>
> >> Any hints on that?
> >>
> >> script commands i added:
> >>
> >> add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
> >> /bin/false
> >> delete user script = /usr/sbin/userdel -r '%u'
> >> add group script = /usr/sbin/groupadd '%g'
> >> delete group script = /usr/sbin/groupdel '%g'
> >> add user to group script = /usr/sbin/usermod -G '%g' '%u'
> >> add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody
> >> '%u' -g machines
> >>
> >>
> >> this is running on Ubuntu 10.04-LTS server
> >>
> >>
> >> greetings
> >>
> >> Juergen.
> >> -- 
> >> To unsubscribe from this list go to the following URL and read the
> >> instructions:  https://lists.samba.org/mailman/options/samba
> Hi, thanks for the hint.
> 
> but the profile dir doesn't get created.
> 
> i edited the path in the script and gave it chmod u+x (to be sure :) )
> 
> still nothing created.
> 
> if i run the script by hand it works.
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions: 
> https://lists.samba.org/mailman/options/samba

--
Мой Мир@Mail.Ru в твоем мобильном!
Просто зайди с телефона на m.mail.ru

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 11:50, schrieb Bruce Richardson:

On Wed, Mar 16, 2011 at 11:09:59AM +0100, J. Echter wrote:

Hi,

i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

It'll be created automatically when the user first logs in, if you have
the right permissions on the profile share.  It is possible to set the
permissions/acls such that this doesn't allow users to read or interfere
with each other's profiles.

You only need to create it yourself if you want to preload it with some
data.  Is this what you need to do?


ah maybe this is interesting too

[profile]
   comment = Profildateien
   path = /home/samba/profile
   guest ok = yes
   browseable = no
   create mask = 0600
   directory mask = 0700
   writeable = yes
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 11:50, schrieb Bruce Richardson:

On Wed, Mar 16, 2011 at 11:09:59AM +0100, J. Echter wrote:

Hi,

i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

It'll be created automatically when the user first logs in, if you have
the right permissions on the profile share.  It is possible to set the
permissions/acls such that this doesn't allow users to read or interfere
with each other's profiles.

You only need to create it yourself if you want to preload it with some
data.  Is this what you need to do?

no, i want to have a profile dir created when a new created user logs 
in. that's it. :)


in my setup it doesnt get created.

permission:

drwxrwxrwx  4 root   root4096 Feb 12 10:51 samba
drwxrwxrwx 16 root   root   4096 Mar 16 11:50 profile

should be working for automagic creation.

is there an special option on that?
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Bruce Richardson
On Wed, Mar 16, 2011 at 11:09:59AM +0100, J. Echter wrote:
> Hi,
> 
> i have a Samba PDC (no LDAP) and added add user script to my config.
> 
> I can create the user with no problems, login is possible but the
> /home/samba/profile/user dir is not created.

It'll be created automatically when the user first logs in, if you have
the right permissions on the profile share.  It is possible to set the
permissions/acls such that this doesn't allow users to read or interfere
with each other's profiles.

You only need to create it yourself if you want to preload it with some
data.  Is this what you need to do?

-- 
Bruce

Bitterly it mathinketh me, that I spent mine wholle lyf in the lists
against the ignorant.  -- Roger Bacon, "Doctor Mirabilis"
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 11:33, schrieb Wasil:

Hi
You must have something like this:

in smb.conf^
[profiles]
.
root preexec = /usr/local/bin/mkprofile.sh %u %g
  

mkprofile.sh:

#!/bin/sh
PROFILE=/data2/profiles/$1
if [ ! -e $PROFILE ]; then
mkdir -pm700 $PROFILE
chown $1:$2 $PROFILE
fi

Wed, 16 Mar 2011 11:09:59 +0100 письмо от "J. 
Echter":


Hi,

i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

Any hints on that?

script commands i added:

add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
/bin/false
delete user script = /usr/sbin/userdel -r '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/usermod -G '%g' '%u'
add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody
'%u' -g machines


this is running on Ubuntu 10.04-LTS server


greetings

Juergen.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Hi, thanks for the hint.

but the profile dir doesn't get created.

i edited the path in the script and gave it chmod u+x (to be sure :) )

still nothing created.

if i run the script by hand it works.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread J. Echter

Am 16.03.2011 11:21, schrieb Marco Ciampa:

On Wed, Mar 16, 2011 at 11:09:59AM +0100, J. Echter wrote:

Hi,

i have a Samba PDC (no LDAP) and added add user script to my config.

I can create the user with no problems, login is possible but the
/home/samba/profile/user dir is not created.

Any hints on that?

IMHO you have to create it with a script.
In that script you will create the user (with useradd) and then the profile 
dir...


ok, seems i need to figure out how this has to be done...

greetings.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Wasil
Hi
You must have something like this:

in smb.conf^
[profiles]
.
root preexec = /usr/local/bin/mkprofile.sh %u %g
 

mkprofile.sh:

#!/bin/sh
PROFILE=/data2/profiles/$1 
if [ ! -e $PROFILE ]; then 
mkdir -pm700 $PROFILE 
chown $1:$2 $PROFILE
fi

Wed, 16 Mar 2011 11:09:59 +0100 письмо от "J. Echter" 
:

> Hi,
> 
> i have a Samba PDC (no LDAP) and added add user script to my config.
> 
> I can create the user with no problems, login is possible but the 
> /home/samba/profile/user dir is not created.
> 
> Any hints on that?
> 
> script commands i added:
> 
> add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s 
> /bin/false
> delete user script = /usr/sbin/userdel -r '%u'
> add group script = /usr/sbin/groupadd '%g'
> delete group script = /usr/sbin/groupdel '%g'
> add user to group script = /usr/sbin/usermod -G '%g' '%u'
> add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody 
> '%u' -g machines
> 
> 
> this is running on Ubuntu 10.04-LTS server
> 
> 
> greetings
> 
> Juergen.
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba PDC adding new user, profile dir is not created

2011-03-16 Thread Marco Ciampa
On Wed, Mar 16, 2011 at 11:09:59AM +0100, J. Echter wrote:
> Hi,
> 
> i have a Samba PDC (no LDAP) and added add user script to my config.
> 
> I can create the user with no problems, login is possible but the
> /home/samba/profile/user dir is not created.
> 
> Any hints on that?

IMHO you have to create it with a script.
In that script you will create the user (with useradd) and then the profile 
dir...

-- 


Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba