Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: mbachmann on November 24, 2006, 10:17:50 AM
-
A SME 6.0.1 maps a Samba network drive to all windows users via
net use N: \\Nautilus1\%username%
A SME 7.0 maps a Samba network drive in the same way.
The difference between: SME 6.0.1 treats the Windows user names lowercase. SME 7.0 treats the Windows user names correctly. My Windows username is MBachmann, which, on SME 6.0.1 appears as mbachmann and on SME 7.0 as MBachmann.
Treating user names correctly is essentially a good thing. But the user accounts in the server-manager are all lowercase. How and where may i force to SME 7.0/Samba to handle windows user names lowercase?
Strange: /etc/e-smith/templates/etc/smb.conf/11caseSensitive has the value case sensitive = no
-
Looks like you already have it but you can check the SAMBA man pages. Looks like they have some info about NAME MANGLING:
http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html
-
I don't get it. It's all the same on SME 6.0.1 and 7.0:
/etc/e-smith/templates/etc/smb.conf/11preserveCase
{
# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
}
preserve case = yes
-
Got it. It is not the way samba handles the user names, it is the way the CUPS pdf script in /usr/lib/cups/backend handles the user names.
Inside the script the variable $2 stores the user name. If I log on with MBachmann, it stores MBachmann, mbachmann stores mbachmann.
If i use the variable to copy a file to a user home dir, a logged on MBachmann results the script to fail, because it cannot find the dir /home/mbachmann.
Can anyone tell, how i force the variable to treat my login lowercase?
OUTPUTFILENAME="$PDFDIR/$2-$PRINTTIME.pdf
-
If you script is shell, you can use this example:
#echo "ZaBBix"| tr [A-Z] [a-z]
results on: zabbix
Good luck!
Jáder
-
[root@metrokles ~]# echo MBachmann | tr [:upper:] [:lower:]
mbachmann
Nice. Now i need the variable lowercase, not the output.
-
I´m not a programmer... so can BE COMPLETL WRONG, but I think this:
OUTPUTFILENAME="$PDFDIR/$2-$PRINTTIME.pdf
lower_output=echo $OUTPUTFILENAME | tr [:upper:] [:lower:]
and user lowe_output as you new variable.
What that looks to you mbachmann??
Jáder
-
The idea is good. Unfortunately the $2 variable is used to identify the user. My Windows users all start with uppercase user names. This collides with way, SME user accounts are named, always beginning with lowercase letters. So i need to find a way, to convert $2 "on the fly".
-
The correct expression is
$(echo $2 | tr '[:upper:]' '[:lower:]') "$OUTPUTFILENAME"
Maybe this should be moved to Linux general section.
-
mbachmann, you could also lodge a bug report at Bugzilla under the documentation section, In this way, what you have found will eventually migrate to documentation, or FAQ. Rgds. chris.
-
This is no bug, it's logic. Samba in SME default config handles usernames (from Winboxes) as they come in case insensitive but case preserving). Standard SME user accounts defaults to lowercase. "MBachmann" from a Windows/Samba login compared against "mbachmann" from SME accounts is failing if you capture "MBachmann" as a variable and try to operate shellscriptwise against "mbachmann".
-
"This is no bug, it's logic."
Agreed, I used the wrong terminology when saying bug report. Please consider, what you have found about his issue has probably taken a fair amount of your time. This information may be of use to someone else at some stage. Leaving this information in the Forum is no guaranty of permanency - we have seen post "vanishing" by accident. The Bugtracker can also be used to pass information to the Devs or the Doc.team, and in this way, you can ensure that it stays on records for all to access. Just assigned your "bug" to docteam, if you cannot do this, I will catch it and ensure it goes there. Thanks. chris.
-
burnat, i've reported this to Robert van der Aker already, the creator of the SME CUPS contrib. I would report this to bugtracker, if CUPS contrib was available (it is not). I cannot choose from "assign to", it's automatically filled as you choose a contrib.