LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   mount -t cifs without password (http://www.linuxquestions.org/questions/linux-server-73/mount-t-cifs-without-password-785474/)

ericyao 01-28-2010 07:56 PM

mount -t cifs without password
 
Hi All

I have one NAS device and using samba share one folder without password, how can I use command mount -t cifs to mount this share folder? I tried the below command, but always popup password checking?
How should I do mount this folder without password checking?


#mount -t cifs -o user=nobody.password=nobody //192.168.0.253MailBackup /MailBackup
Password:

kforbus 01-29-2010 12:53 PM

Quote:

Originally Posted by ericyao (Post 3844276)
Hi All

I have one NAS device and using samba share one folder without password, how can I use command mount -t cifs to mount this share folder? I tried the below command, but always popup password checking?
How should I do mount this folder without password checking?


#mount -t cifs -o user=nobody.password=nobody //192.168.0.253MailBackup /MailBackup
Password:

Since you are specifying a password in the command: Try replacing the "." between the samba user and password with a comma ",".

Another way to do this password-less would be to add the line "guest account = nobody" to your smb.conf and the line "guest ok = yes" to your share definition in smb.conf. Then you can change your mount command to:

#mount -t cifs -o guest //192.168.0.253/MailBackup /MailBackup

slacker_et 01-29-2010 01:01 PM

Either mount it using the "guest" option, or use a "credentials" file to supply the domain, username, and password.

Personally I've never used the "guest" option. And I routinely use a credentials file.

Example of specifying a credentials file:
Code:

mount -t cifs //servername/mylogin /home/mylogin/windows -o uid=mylogin -o gid=groupname -o credentials=/home/mylogin/winpasswd
Example of a credentials file:
Code:

username=mylogin
domain=domainname
password=password_in_plain_text

And permissions on the credentials file are so that only the owner can read it.

--ET

ericyao 01-30-2010 07:50 AM

Hi

Thanks, my question has been fixed, thanks all who replied this thread, this web-site is very useful ^^


All times are GMT -5. The time now is 08:52 AM.