Wednesday, August 28, 2019

Mengakses printer windows XP dari ubuntu

bila dari windows bisa pakai http:
http://yourcomputersIPaddressorwinshostname:631/printers/yourprinters-exact-name

Bila dari ubuntu, untuk cek printer:
smbclient -L rice -N
atau
smbclient -I 192.168.1.25 -L rice -N
cek SMB:
ls -l /usr/lib/cups/backend/smb
Bila tidak ada
ln -s `which smbspool` /usr/lib/cups/backend/smb
tambah manual printer:
lpadmin -p RicePrinter -v smb://rice/INKJET -P /root/inkjet.ppd
enable RicePrinter
accept RicePrinter
lpadmin -d RicePrinter
lpadmin -p RicePrinter -h 192.168.1.25 -i smb://rice/inkjet-P /root/inkjet.ppd


tes printer:
/usr/bin/smbclient -L {Server_IP} -U {ad.domain.name.com}/{domain_username}




  1. On system settings -> printer -> properties, set the authentication details as follows:
    Username youruser@domain.com
    Password yourpass
    VERIFY
    
  2. Print test page

setelan lain:
1) sudo vim /etc/samba/smb.conf

search for 'workgroup' and set the value to be whatever your workgroup/windows domain is.

2) sudo vim /etc/cups/printers.conf

search for DeviceURI 
Update the string to contain your domain, username and password e.g.

DeviceURI smb://MYDOMAIN\MyUsername:MyPassword@printerhost/printername

3) sudo service cups restart

4) Print a test page

nama domain harus uppercase:

In my case the domain name points to a netbios print server and as: 1) netbios names are (almost) always uppercase and 2) we (in UNIX/Linux) assume case sensitively then it should be in UPPERCASE


mb:// username:password@192.168.2.82/HPLaserJ atau

Friday, August 9, 2019

Solusi masalah sharing windows dengan mounting di ubuntu

Contoh:
/dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1

MountWindowsSharesPermanently

Mounting unprotected (guest) network folders

//servername/sharename /media/windowsshare cifs guest,uid=1000,iocharset=utf8 0 0
Where
  • guest indicates you don't need a password to access the share,
  • uid=1000 makes the Linux user specified by the id the owner of the mounted share, allowing them to rename files,
  • iocharset=utf8 allows access to files with names in non-English languages. This doesn't work with shares of devices like the Buffalo Tera Station, or Windows machines that export their shares using ISO8895-15.
  • If there is any space in the server path, you need to replace it by \040, for example //servername/My\040Documents

Mount password protected network folders

The quickest way to auto-mounting a password-protected share is to edit /etc/fstab (with root privileges), to add this line:
//servername/sharename  /media/windowsshare  cifs  username=msusername,password=mspassword,iocharset=utf8,sec=ntlm  0  0
This is not a good idea however: /etc/fstab is readable by everyone and so is your Windows password in it. The way around this is to use a credentials file. This is a file that contains just the username and password.
Using a text editor, create a file for your remote servers logon credential:
gedit ~/.smbcredentials
Enter your Windows username and password in the file:
username=msusername
password=mspassword
Save the file, exit the editor.
Change the permissions of the file to prevent unwanted access to your credentials:
chmod 600 ~/.smbcredentials
Then edit your /etc/fstab file (with root privileges) to add this line (replacing the insecure line in the example above, if you added it):
//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 
Save the file, exit the editor.

Special permissions

If you need special permission (like chmod etc.), you'll need to add a uid (short for 'user id') or gid (for 'group id') parameter to the share's mount options.
//servername/sharename  /media/windowsshare  cifs   uid=ubuntuuser,credentials=/home/ubuntuuser/.smbcredentials,iocharset=ut

Unprotected network folder won't automount

I've had a situation where an unprotected network folder wouldn't automount during bootup, but after manually entering "sudo mount -a" was mounted correctly. I solved this by replacing the "guest" option by "username=guest,password=". If anyone has an explanation for this, please leave a comment.
//servername/sharename  /media/windowsshare  smbfs  username=guest,password=,uid=1000,iocharset=utf8,codepage=unicode,unicode  0  0

Slow shutdown due to a CIFS/Network Manager bug

If you use Network Manager, and are getting really slow shutdowns, it's probably because NM shuts down before unmounting the network shares. That will cause CIFS to hang and wait for 60 seconds or so. Here's how to fix it:/etc/rc0.d/S31umountnfs.sh
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K14umountnfs.sh
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K14umountnfs.sh




An alternative is to specify the user and group ID that the mounted network share should used, this would allow that particular user and potentially group to write to the share. Add the following options to your mount: uid=<user>,gid=<group> and replace <user> and <group> respectively by your own user and default group, which you can find automatically with the id command.
sudo mount -t cifs -o username=${USER},password=${PASSWORD},uid=$(id -u),gid=$(id -g) //server-address/folder /mount/path/on/ubuntu
If the server is sending ownership information, you may need to add the forceuid and forcegid options.
sudo mount -t cifs -o username=${USER},password=${PASSWORD},uid=$(id -u),gid=$(id -g),forceuid,forcegid, //server-address/folder /mount/path/on/ubuntu

  • it worked for me! But we should add that if the shared folder is in a PC with a login domain you should add the option domain. Something like this: sudo mount -t cifs -o username=${USER},password=${PASSWORD},dom=${DOMAIN}, uid=<user>,gid=<group> //server-address/folder /mount/path/on/ubuntu In fact the domain can go in the "username" option, but remember that you have to use / instead of `, likeusername=DOMAIN/user.name`. – João Portela Dec 19 '14 at 9:17 
  • Yes, that's correct. :-) One might need to specify the domain or workgroup (for older Windows version) via the "domain=" option or via the username, that's a good point. And sometimes it is even necessary to specify the encryption scheme or the CIFS version to be used. But all this was not part of this question, so I left it aside. :-) – Huygens Dec 20 '14 at 16:08

Thursday, July 4, 2019

Menghilangkan opsi launch start up repair di Windows 7



Untuk bisa menghilangkan opsi launch start up repair setelah lampu mati saat booting, jalankan perintah berikut di cmd yang di run as administrator (cari di program/assesories):
bcdedit /set {default} recoveryenabled No 
bcdedit /set {default} bootstatuspolicy IgnoreAllFailures

Monday, May 27, 2019

Cara install font TTF punya windows di ubuntu

Untuk install font basic bisa pakai perintah
sudo apt-get install msttcorefonts
Setelah itu jalankan perintah:
sudo fc-cache -f -v
Bila ingin copy manual, copy file ttf ke
/usr/local/share/fonts 
Atau bisa dicopy ke sub direktori di home dengan nama ./fonts

Untuk lihat font yang terinstall bisa menggunakan
apt-get install fontconfig 
fc-list | grep "<name-of-font>"

Thursday, March 21, 2019

Mengatasi tombol shutdown hilang di ubuntu 12.04 dengan gnome-fallback

Untuk bisa mendapatkan tampilan yang klasik, ubuntu dengan tampilan unity bisa diinstal dengan gnome session fallback atau flashback. Namun terkadang tombol shutdown bisa hilang sendiri.

Untuk mengembalikan tombol, bisa menggunakan kombinasi tombol Alt dengan right click mouse button pada panel. Nanti akan ada opsi untuk menambahkan tombol yang hilang.

Bila GUI menggunakan compiz, kombinasi tombol adalah Alt + Windows + Right click mouse button.


Cara berikut yagn diposting di internet, dan harus instal aplikasinya:
dconf reset -f /org/gnome/gnome-panel/
killall gnome-panel
gconftool-2 --recursive-unset /apps/panel
mkdir ~/gnomepanelbackup ; mv ~/.gconf/apps/panel ~/gnomepanelbackup
cp -r /tmp/backup/.gconf/apps/gnome-terminal/ ~/.gconf/apps/
killall gconfd-2

Monday, February 25, 2019

Mengatasi tab "wireless network" hilang dari wifi Windows XP

Solusinya adalah dengan menghapus wifi adapter di "device manager". lalu click kanan ikon komputernya, lakukan "scan hardware change".

pastikan driver tersedia, jaga jaga akan ditanyakan driver.

Sunday, February 24, 2019

Cara booting safe mode di Windows 10 dengan restart

Di Windows 10, booting safe mode bisa dilakukan dengan menekan tombol ctrl-F8 saat booting. Namun kadang ini susah dilakukan.

Sebagai alternatif booting bisa dilakukan lewat restart juga. Caranya adalah menekan tombol shift pada saat menekan pilihan restart di ikon power di kiri bawah layar.

Setelah ditunggu beberapa lama akan muncul layar recovery. Pilih menu trouble shooting.Lalu pilih menu advanced option. selanjutnya muncul layar lagi. Pilih "start up settings". Bila tidak kelihatan, tekan link more setting di bawah.

Di layar ini akan muncul tombol restart. Setelah ditekan komputer akan restart dan menampilkan pilihan booting. Pilihan bisa dilakukan dengan menekan tombol keyboard. Misalnya tombol F4 untuk safe mode.