Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!
How do I use smbmount without specifying a password every time? I'd like to be able to either map a linux user to a specific set of windows creditials or have samba read the password from it's /etc/samba/private/smbpasswd file, so I only have to specify the username. Is this possible?

Adbot
ADBOT LOVES YOU

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

covener posted:

You can specify the options for these shared directories in /etc/fstab using the options from smbmount manpage (user=foo%bar,uid=1000,...)

You can then mount it by just passing the mountpoint to the mount command

I'm looking for a way to mount the share without keeping a plaintext password anywhere.

The entry in /etc/fstab looks like:
//192.168.1.200/share /mnt/share smbfs username=Mashi,rw 0 0

But since the windows share requires a password along with the username, I'm prompted for a password every time. I'd like for it to read the password from /etc/passwd, or /etc/samba/smbpasswd.

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

covener posted:

Both of those files store 1-way digests of the password -- your password can't be extracted from it and sent to the remote system.

You can stash your password in a file with the credential= option, which you can protect more then /etc/fstab

Ah ok, thanks mate.

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!
When using ssh-agent, is there an easy way to connect to an existing ssh-agent session? Let me explain..

Say I start ssh-agent on my desktop, having it launch my window manager (ssh-agent startxfce4). So all the programs that are launched under xfce4 have the correct environment variables set.

Then I log in via SSH from somewhere else. The environment variables are not set because I'm not logging in under my xfce4 session.

What I can do is find the PID of some process that is under the xfce4 session, and read /proc/{pid}/environ to get the environment variables (and then manually set them with export), but this requres root access and is a bore. Is there another way? Or perhaps there is a good reason why this is not the default behaviour of ssh-agent?

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

covener posted:

Your shells within xfce will stash it, your new shells will grab the existing agent. I do something similar on cygwin, where I only use standalone rxvt's with no x server or DE.

Pretty neat. Using this method you avoid having to start your desktop manager underneath ssh-agent. I wonder why everyone isn't doing it.

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

covener posted:

I think inheriting it from your xsession is the way to go when you can, I wouldn't ever use this kludge to replace it.

I am inheriting it from my xsession, the issue is getting access when you ssh in.

Adbot
ADBOT LOVES YOU

Mashi
Aug 15, 2005

Just wanted you to know your dinner's cold and the children all agree you're a shitheel!

hobofood posted:

I'm still new to all this stuff, so it is probable that I have a huge misunderstanding, so please bear with me:

I am running Ubuntu 8.10, and I want to use my home PC to serve a simple text file using apache. I have apache installed and going to [url]http://[/url][mydomain.com]/ results in me seeing apache's "It works!" page.

So now I want to put a text file in apache's default directory, so I poked about and I found /var/www - which sounded right to me, so I did this:

code:
hobofood@hobofood-desktop:~$ ls > test.txt
hobofood@hobofood-desktop:~$ sudo ln -s test.txt /var/www/test.txt
Now, if I go to [url]http://[/url][mydomain.com]/test.txt then I get a 403 error

What do I have to do to be able to see this file? Is this an apache configuration thing, or is it a linux user permissions issue?

Find httpd.conf and see what your actual document root is.

It could be a permissions issue, usually Apache has it's own user so check that that user is able to read the file.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply