Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, April 6, 2012

CIFS Share Mount as non-root


Trying to run smbmount as a non-root I received the error:

mount.cifs: permission denied: no match for...

Option 1 - Permanent:


Set this up in fstab would be a permanent solution on every boot.
Add a line like this to your fstab file.

Open Share:

//server/path/to/share /mount/point cifs dir_mode=0775,guid=1000 0 0

Protected Share:

//server/path/to/share /mount/point cifs credentials=/root/.smbpass,dir_mode=0775,guid=1000 0 0

For a protected share, create the file /root/.smbpass Add these lines to the file.
username={username of server}
password={password}

 

Option 2 - Temporary:


For me, my laptop moves around in many server environments so I use a more flexible method that does not auto-mount on boot.

If using Ubuntu you can use the "Connect to Server" under "Places" but I prefer using the following command.  I find it is simpler and quicker.  Either method you choose, once connected you can create a bookmark in nautilus allowing easier re-mount by selecting the bookmark.  You only need to decide whether to permanently store the share password or ask for it on each mount.

Open or Protected Shared:

gvfs-mount smb://server/path/to/share

If the share is protected you will be asked for:
User [localuser]: {username of server}
Domain [WORKGROUP]: {server domain of user account}
Password: {password}

This will add the share and allow you to unmount it without using root.


Additional Information:


Shares goto ~/.gvfs by default but you can always map them to another area if needed.

Thursday, April 15, 2010

Ubuntu 9.10 "Do Nothing" Laptop Lid Closed

For anyone wondering how to force Ubuntu to "Do Nothing" when closing the lid of a laptop.

The option does not exist in Power Management Preferences.

So...

In a terminal (Applications-->Accessories-->Terminal), type: gconf-editor

Navigate to apps-->gnome-power-manager-->buttons and set lid_ac and/or lid_battery to "nothing" (without the quotes).

Wednesday, September 30, 2009

Reboot a Locked Ubuntu System Safely

Though it rarely happens. Their are times when you need to reset an Ubuntu system. Usually when you are setting up a new graphics card (or 2), or setting up a new xorg file. Nonetheless, if the screen freezes and CTRL+ALT+F1 or CTRL+ALT+Backspace fails to work remember these ALT+SysRq (or ALT+PrntScrn) combinations:

ALT+PrntScr+r, ALT+PrntScr+s, ALT+PrntScr+e, ALT+PrntScr+i, ALT+PrntScr+n, ALT+PrntScr+u, ALT+PrntScr+b

To remember the keys, remember this nonsensical phrase: "Raising Skinny Elephants Is Never Utterly Boring".

Alternatively, you can hold down CTRL+ALT+SysRq while very slowly typing; R E I S U B. A way to remember this is by inverting the word: "BUSIER" or remebering this nonsensical phrase: "Restart Even If System Utterly Broken".