Re: (no subject)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Have a look:

EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: mueller@xxxxxxxxxxxxxxx

-----Ursprüngliche Nachricht-----
Von: samba-bounces@xxxxxxxxxxxxxxx [mailto:samba-bounces@xxxxxxxxxxxxxxx] Im Auftrag von ciradhb.forward@xxxxxxxxxxx
Gesendet: Mittwoch, 4. April 2012 12:06
An: Moray Henderson; samba@xxxxxxxxxxxxxxx
Betreff:  (no subject)

 Hi Moray, 
Thanks for your answer. It could help but only partially. 
The script name logon%u.cmd was a bad example. Actually, a user can log on from WinXP , or Win 7 workstations, and I'like to run different logon scripts depending on the OS . So having logon script = logon%a.cmd in the smb.conf generally works thanks to variable substitution.
But for user accounts that have been created with the USRMGR.EXE tools, the Logon Script attributes have not been set and it seems not possible to modify it with variables using "pdbedit --script" .(one precision : I use  passdb backend = tdbsam ).

Your script could help , but as you said logon script name will be hardcoded for each users which I want to avoid. 

Isn't it possible to manually change some entries in the passdb.tdb file ?   
> -----Message d'origine-----
> De : Moray Henderson [mailto:Moray.Henderson@xxxxxxxxxxxxxxxx]
> Envoyé : mercredi 4 avril 2012 12:56
> À : ciradhb.forward@xxxxxxxxxxx; samba@xxxxxxxxxxxxxxx Objet : RE: 
>  macro characters with pdbedit ?
> > From: ciradhb.forward@xxxxxxxxxxx 
> > [mailto:ciradhb.forward@xxxxxxxxxxx]
> > Sent: 03 April 2012 11:49
> >
> > Hi,
> >
> > I would like to change the Logon script name attributes of a samba 
> > user account to something like logon%u.cmd using pdbedit with the 
> > --script option. It does not work because the string logon%u.cmd is 
> > litteraly taken as the value, loosing the variable substitution at 
> > evaluation time. pdbedit -v output gives "Logon Script : logon%u.cmd" .
> >
> > When creating a user account without --script option, it takes by 
> > default the string that is specified in the smb.conf (say :
> > logon%a.cmd) as a macro that will be evaluated later (pdbedit -v 
> > gives Logon Script: logonUNKNOWN.cmd which seems normal on linux).
> >
> > So my question is :  is it possible to use macro characters with 
> > pdbedit the same way they are used in the smb.conf ? If not how can 
> > I change account attributes (and specifically the Logon Script Name) 
> > with macro charaters ? maybe with another tool than pdbedit ?
> >
> > Thanks in advance
> >
> > Henri
> You could hard-code each user name into the Logon Script using a shell 
> script to loop through the user database and pick out the
> names:
>   for u in `pdbedit -L | cut -d: -f1`; do
>     [[ $u =~ \\$ ]] && continue    # Filter out machine accounts
>     echo pdbedit -S logon_$u.cmd -u $u
>   done
> If it looks like the pdbedit commands are correct, remove the "echo".
> Otherwise, you could try setting --script to whatever it gets when it picks up its value from "logon script" in smb.conf.
> Moray.
> “To err is human; to purr, feline.”

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail
To unsubscribe from this list go to the following URL and read the

To unsubscribe from this list go to the following URL and read the

[Linux]     [Info Cyrus]     [LARTC]     [Bugtraq]     [Netfilter]     [Internet Dating Forums]     [RAID]     [Yosemite News]     [Photography]

Add to Google Powered by Linux