how to set the charset of smb/cifs server on Solaris 11 - character-encoding

I am setup a Solaris 11 server which provides cifs/smb service since it will perform as a home NAS with ZFS. I setup the smb server and I can read/write files via smb from my Windows 7 desktop, but I found the chinese character in the file name is shown incorrect from the solaris console, how do I set the charset to get it works well?
I can copy the file with chinese character in the filename from Windows to Solaris, and vice-versa, and the chinese character is displayed well on Windows desktop, but I cannot read it in the solaris console.
Thanks.

If you mean the system console (/dev/console) used when no graphic environment is launched, I believe only a 7bit ASCII font is supported.
If you are under a graphic environment (Gnome or CDE), make sure you are running a UTF-8 locale.

The locale is zh.UTF8, I tried using PuTTY to connect my solaris server with UTF8, it works well.

Related

RDP printer redirection doesn't work from Windows computer, but works from Mac

I have 1 Mac and 1 Windows.
From the Mac, using Microsoft RDP, I connect to a Windows Server 2019 and I can see my local printer (redirected) in the Windows server. I can print without any problem.
From the Windows, using RDP, I connect do the same Windows server and I don't see my local printer.
Notes:
I configured both RDP to enable local resources (printer)
I didn't install the printer driver in the server. Since I can use it from the Mac, I conclude that I don't need to install it in the server.
Any idea why I can't see the local printer from the Windows computer and how to fix it?
Thanks!

Access Rails App Subdomains Through VirtualBox

I'm running a Windows 7 VirtualBox on my Ubuntu 13.10 machine where I have my rails app. I access my rails app through subdomains (i.e. subdomain1.lvh.me:3000) and I'm trying to access these same subdomains through my VB. I've read to change the host file but I haven't been able to make it work. Would I be using the Gateway IP or the IPv4 address?
The reason for me trying to accomplish this is to develop on my Ubuntu machine and test for IE issues on my VB without using paid third party websites to render my changes.
I think that if, for example, your ubuntu machine's ip address is 192.168.0.123, then it should suffice to have this line in your windows hosts file
192.168.0.123 subdomain1.lvh.me subdomain2.lvh.me subdomain3.lvh.me
Then on your windows vb you would access subdomain1.lvh.me:3000 like you say.
Have you done this? I don't know what you mean by " I've read to change the host file but I haven't been able to make it work. " What isn't working?

Finding Informix DB Server

I have a server and I know that there is an Informix installed on it, but I don't know who installed it. There is closed source client connecting to this server but I cannot get anything about it apart from username and password. I have no idea how to connect it, I don't know what would be the port number and server name of it. I have downloaded SQuirreL with JDBC Informix drivers.
How can I connect to JDBC Informix server without knowing the port and server name?
In short, you will need the port number, server name (and database name as well) to connect to Informix.
Assuming that you have permissions to hunt around on the box where Informix is installed, there are a few places where the details about your Informix server are likely to be found. Since I don't see any details as to the platform on which IDS (Informix) is installed in your case, I'll try to provide info for both Unix and Windows platforms. But first, a bit of background:
There are not too many parameters needed to set up a connection to Informix. Typically, all you would need are:
username
password
Server IP Address
Port
Server Name (the name of the Informix instance)
Database Name (the name of the db on [Server Name] to which you want to connect)
It sounds like you need to find out the last three.
Linux:
On a Linux platform (as well as Windows, I believe), there are environment variables that point the way to where on your system Informix is installed. The most important of these is %INFORMIXDIR%, which points to the root directory of your Informix installation. A lot of the time however, Informix is installed in /opt, so try there.
In %INFORMIXDIR%/etc on typical installs is a file called sqlhosts (it may have a suffix for your specific server instance, but it'll start with sqlhosts). In this file is the server name, and possibly the port number. %INFORMIXDIR%/etc/sqlhosts contains plaintext data in the following format:
ServerName NetType HostName Port/ServicesName
The first value is the server name you seek. The fourth value (Port/ServicesName) is either the port number, or the name of the entry in /etc/services which references the port number. If you don't see a port number, look in /etc/services.
For example, sqlhosts will probably contain something like this:
myservername onsoctcp informix.mydomain.com 12345
In this case, your server name is "myservername" and the port is 12345
Alternatively, it could look like this:
myservername onsoctcp informix.mydomain.com informixservice
in which case you would have to go look in /etc/services for a line that says
informixservice 12345/tcp
which will tell you the port.
Windows
Caveat: I've never dealt with Informix servers installed on Windows, however based on the IBM documentation, it doesn't seem much different in regards to the task at hand.
Instead of the file %INFORMIXDIR/etc/sqlhosts, the information you seek is contained in the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\INFORMIX\SQLHOSTS
Use regedit.exe to read the values stored in this entry.
If you don't find a port number in that reg key, the Windows equivalent of Unix's /etc/services file is
C:\Windows\System32\drivers\etc\services
Examine this file with a text editor (notepad works fine).
Hopefully this helps. Good luck.
*Short answer: You can not .*
This kind of situation involves security issues , so , the database doesn't "publish" it self at your network for everyone knows it's there.
If you need discovery without contact the administrator of your (your?) environment, will need to use hackers techniques (nmap utility already help here) to discover some informations (IP, Port) and you still missing informations like servername, protocol ,username and password.
Just caution, because attempt of connection at Informix database listener will be logged.
Now, if you have access at the server where the database is you can look for sqlhosts file and get all this.
Another alternative, more reasonable is just ask to your DBA/Admin the configurations justifying why you want the access.
You CAN find servers on a host:
onstat -g dis
will listed servers even if they are offline (or potentially decommissioned).
Server information is in /INFORMIXTMP on UNIX/Linux and I would expect a simlar folder under C:\ in Windows.
You should add more information about working environment: what platform your client is, what platform your server is, do you have access to server machine etc.
If you know that something from your computer connects to other machine then you can use netstat to discover it. If you work on Linux then there is -p option that shows pid and application name to each connection.
At first we have to discover pid of closed source client:
[root#test1 ~]# ps aux | grep my_app
root 12457 0.0 3.2 3342440 333336 ? Sl Mar06 21:01 java -cp /usr/local/bin/my_app...
Now when I know pid I can use netstat:
[root#test1 ~]# netstat -tnp | grep 12457
tcp 0 0 ::ffff:169.0.1.71:55850 ::ffff:169.0.1.74:9088 ESTABLISHED 12457/java
From this output I can see that Infomix probably works on port 9088 of 169.0.1.74 machine.
On Windows you can use TCPView from SysInternals to see similar things.
On Windows you can also check ODBC Data Source Administrator (both 32 and 64 bit) to see if there is Informix driver in use.

How to access a local rails website using virtualbox

I'm working on a local Rails website, and I'd like to access to it from my visrtualbox machine running winXP
From my Ubuntu machine, I use my browser to open http://www.myapp.local:3000
How can I access it from Virtualbox?
Thanks a bunch!
On your xp machine, open up your hosts file at C:\Windows\System32\drivers\etc\hosts in a local text editor like notepad or whatever is on there.
Then add a line like this:
10.70.30.31 www.myapp.local
Where 10.70.30.31 is the IP address of your Ubuntu machine.
Save the hosts file. Then restart whatever browser you're using on the XP box. Make sure you close all of the browser windows you have open as well because your browser will cache your hosts file until you properly restart it.
Once you've opened a new browser window you should be able to access your rails site from the same address you use on your Ubuntu machine.
http://www.myapp.local:3000

Windows Service Printing Behaviour

Alright, I was tasked to develop a Windows Service that listens to a directory for files that are dropped in it, read them, delete them and print out a report.
I installed the service on my work laptop (Win 7 x86) and a test machine (XP x86) under a User account at first. It would do everything as it should except the print the report. No errors, nothing. Then I made it run under Local System and it produced a "No printers found" exception.
Converting the app to a Console Application and running on these machines gave the desired result. OK, so now I was assuming that there are security "stuff" involved.
Then I installed the service on a Server 2008 x64 machine (under Local System) and it just worked. Can anybody explain to me why this is happening? Why does the service allow printing from Server OS but not from a Desktop OS or am I missing something very obvious?
I'm guessing that the printers are installed locally on the server but installed as network printers on the desktop. Local System only have access to local printers.

Resources