• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux SAMBA question

Moonark

Senior member
Is there a way to mount windows shares in Linux using a domain username and password? I know you can do it by using a passowrd on a machine such as smbmount //mycomputer/share /home/Moonark/myshare -o username=Moonark that is how I would connect to my local machine. Can it be done if my machine is on a domain, and use the domain username and password instead of one on the local machine? There has got to be a way because I hear about people using it in businesses but I have no idea how to set it up.
 
Just use the username domain\\username (2 backslashes because it's a special character and you have to espcape it with another backslash)
 
Ok, my next question is, is there a way to have a sort of login script run when a user logs in so that these shares will connect automatically?
 
You could script it a few ways, but the problem is the password, there's no way to get it automatically so you'd need a program to prompt the user for it.
 
I don't know how secure it would be, but (at least for server authentication) you can append the password to the username, delimited by %. Quick example with smbmount:

# smbmount //server/share /mnt/share -o username=username%password,workgroup=WORKGROUP

I assume you can stick the appropriate options into fstab, and it would be automatically mounted upon boot. However, I'm not sure if that's a secure solution.
 
I could write a little GUI to handle the password entries, but is there a way to automatically grab the username? In WIN2K I can use %username% to get the name, is there a way to do that in linux? Once I get that I can have a box pop up with a password field.
 
Back
Top