Session request failed (Called name not present)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Session request failed (Called name not present)
# 1  
Old 03-30-2004
Session request failed (Called name not present)

I have the following shell script to map a drive to a windows machine:

Code:
echo Enter password:
stty -echo
read passwd
stty echo
mount -t smbfs -ousername=myusername,password=$passwd //192.168.2.5/sharename /mnt/mountname

It works fine and the share mounts, but for some reason I get this error:
4615: session request to 192.168.2.5 failed (Called name not present)
4615: session request to 192 failed (Called name not present)

Anyone have any clues?
# 2  
Old 03-30-2004
try useing hostnames.

for alot of the smb products out there ip will not work.

also if you are trying to mount windows shares to a unix mount point try checking out sharity.

it works excellient and its is free for noncommercial use.

we use it here at work on a variety of servers.
# 3  
Old 03-30-2004
Well the mounting works fine. I just don't know why I get those errors. I use IP because for some reason Samba isn't recognizing the machine names on the network.
# 4  
Old 03-30-2004
I use this little script to mount a samba share (in this case, the default windows shares like C$, D$, etc).

Code:
#!/bin/sh
#< Mount a samba share

SERVER_NAME=xpserver
MOUNTPOINT=/mnt
thiscmd=`basename $0`

function print_usage
{
  echo "usage: $thiscmd drive_letter"
}

if [ "$#" -ne 1 ]; then
   print_usage && exit 1;
fi

su -c "smbmount //$SERVER_NAME/$1\$ $MOUNTPOINT "

exit 0

Of course, you may be able to replace "xpserver" in the SERVER_NAME variable with an IP address, or machine name.

Most of it is "filler", but the line
Code:
su -c "smbmount //$SERVER_NAME/$1\$ $MOUNTPOINT "

does all the actual work, and allows the command to be run as a regular user, as long as they know the root password. It keeps passwords secure rather than saving it as plain text in a variable.

You could modify the smbmount command to read
Code:
smbmount //$SERVER_NAME/$SHARE_NAME $MOUNTPOINT

of course, instead of using the default "dollar" shares.

Peace,
ZB
http://www.zazzybob.com
# 5  
Old 03-30-2004
zazzybob: Your answer did not help. My script works fine. I just want to know why that error appears. When I use smbmount, I get the same errors.

Also, does anyone know how to get Samba to automatically detect the names of machines on the network?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

/dev/ptmx issue session_pty_req: session 0 alloc failed

I've got a Solaris 10 server that got a corrupted root filesystem. After being forced to run fsck against it, the OS is now up and the filesystem read/writable. However, ssh from any account other than root fails with the following error: PTY allocation request failed on channel 0 On the... (0 Replies)
Discussion started by: michaeltravisuk
0 Replies

2. UNIX for Advanced & Expert Users

System call failed with 127 .. after 500 times when called in loop

Hi Experts, I have a code like this. ===== #include.... int main() { int count = 0; while(1){ printf("\n Interation number is: %d \n ",count); rv = system(" test.sh > log.txt " ); if (-1 == rv) { printf("Could not generate static log: error... (12 Replies)
Discussion started by: binnyjeshan
12 Replies

3. Solaris

PTY allocation request failed on channel 0

Hello Admins, Anybody faced this issue while logging through ssh on solaris: I am getting this error now. I was able to logged in before. Now I am getting this error. Any idea? (3 Replies)
Discussion started by: snchaudhari2
3 Replies

4. Solaris

Cygwin X Server error: xdmcp fatal error session failed session 23 failed for display

Hi, i got the following error when i tried to access the cygwin x server from a windows XP PC. "xdmcp fatal error session failed session 23 failed for display" Alternatively, when i tried to access the same Cygwin X Server from another windows XP PC which is on a different LAN... (3 Replies)
Discussion started by: HarishKumarM
3 Replies

5. Linux

3550: session setup failed: ERRDOS

Hi, we have re installes our Windows domain and Activedirectory, and from then until now we can not mount shared windows filesystems on Linux server and we receive : mount -t smbfs -o username=user1,password=xxxxx //xxx.16.0.xxx/dir /mnt/dir 3550: session setup failed: ERRDOS - ERRnoaccess... (0 Replies)
Discussion started by: big123456
0 Replies

6. Windows & DOS: Issues & Discussions

Samba (SMB) client fails: "Called name not present"

Hi, I issue smbclient on a Linux REd hat server : smbclient -L ***.16.0.42 -U domaine/Administrator Password: Domain= OS= Server= Domain= OS= Server= Sharename Type Comment --------- ---- ------- IPC$ IPC IPC distant ... (0 Replies)
Discussion started by: big123456
0 Replies

7. UNIX for Advanced & Expert Users

30494: session setup failed: ERRDOS

Hi, on a Linux RED HAT I issue the following to mount a shared filesystem on a Win server 2003 and it fails : # smbmount //172.16.0.42/eb_depot /mnt/eb_depot -o username=domaine/Administrateur rw Password: 30494: session setup failed: ERRDOS - ERRnoaccess (Access denied.) SMB connection... (0 Replies)
Discussion started by: big123456
0 Replies

8. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies
Login or Register to Ask a Question