Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:linuxloginscripts [20/06/2017 17:08]
127.0.0.1 external edit
rb:linuxloginscripts [21/06/2019 11:04] (current)
andrew [To Do]
Line 40: Line 40:
  
 Windows fileshare mounting used to work really well with mount.smbfs,​ but as part of the move to cifs, mount.cifs cannot be setuid and without lines in /etc/fstab, fails to work. The reason for this is claimed to be security. I want the login scripts to run as user space programs and not require root to edit fstab, so windows mounting is currently "​broken"​. ​ Please let me know if you can see a solution. Windows fileshare mounting used to work really well with mount.smbfs,​ but as part of the move to cifs, mount.cifs cannot be setuid and without lines in /etc/fstab, fails to work. The reason for this is claimed to be security. I want the login scripts to run as user space programs and not require root to edit fstab, so windows mounting is currently "​broken"​. ​ Please let me know if you can see a solution.
 +
 +Example:- \\
 +mount -t smbfs -o username=yourname,​password=yourpassword //​IPorDNS/​share /mountpoint
 +
 +Command:- \\
 +mount -t smbfs -o username=addm\\bccaawsr,​password=february2008 //​svcedfp01.addm.ads.brm.pri/​Support /​home/​andrew/​i
 +
 +
  
 From [[http://​webscript.princeton.edu/​~pug/​faqwiki/​index.php?​title=Using_SAMBA/​CIFS_to_access_Windows_Shares]] From [[http://​webscript.princeton.edu/​~pug/​faqwiki/​index.php?​title=Using_SAMBA/​CIFS_to_access_Windows_Shares]]
Line 100: Line 108:
 ===== To Do ===== ===== To Do =====
  
-Work out the windows login server from dns drv (_) records, use ldap to retrieve windows home directory. Maybe try to retrieve a windows logon script from the netlogon shared directory once we know the server where it is held and parse it to dynamically build the linux login version. This will break the login.cfg configuration,​ so some redesign is needed. ​+Work out the windows login server from dns srv (_) records, use ldap to retrieve windows home directory. Maybe try to retrieve a windows logon script from the netlogon shared directory once we know the server where it is held and parse it to dynamically build the linux login version. This will break the login.cfg configuration,​ so some redesign is needed. ​
  
 {{:​rb:​logonserver-thumb.jpg?​direct&​100|Find out your Windows Login server}} \\ {{:​rb:​logonserver-thumb.jpg?​direct&​100|Find out your Windows Login server}} \\
Line 247: Line 255:
   [user@eb8470w ~]$   [user@eb8470w ~]$
  
 +
 +
 +==== Scratchpad ====
 +
 +
 +=== SMB3 access ===
 +
 +Pinched from azure connection for Linux example
 +
 +<​code>​
 +sudo mkdir /​mnt/​azuremyresomyvm061717160
 +if [ ! -d "/​etc/​smbcredentials"​ ]; then
 +sudo mkdir /​etc/​smbcredentials
 +fi
 +if [ ! -f "/​etc/​smbcredentials/​azuremyresomyvm061717160.cred"​ ]; then
 +    sudo bash -c 'echo "​username=azuremyresomyvm061717160"​ >> /​etc/​smbcredentials/​azuremyresomyvm061717160.cred'​
 +    sudo bash -c 'echo "​password=aK+zPzfq9TiaLxUAjNGEqW00DStI10mK+Ih1MMgXsBTf3vtE8XMTZLOlmfP19mSRNYq3JjYPaqGSgetI1QQNLA=="​ >> /​etc/​smbcredentials/​azuremyresomyvm061717160.cred'​
 +fi
 +sudo chmod 600 /​etc/​smbcredentials/​azuremyresomyvm061717160.cred
 +
 +sudo bash -c 'echo "//​azuremyresomyvm061717160.file.core.windows.net/​test1 /​mnt/​azuremyresomyvm061717160 cifs nofail,​vers=3.0,​credentials=/​etc/​smbcredentials/​azuremyresomyvm061717160.cred,​dir_mode=0777,​file_mode=0777,​serverino"​ >> /​etc/​fstab'​
 +sudo mount -t cifs //​azuremyresomyvm061717160.file.core.windows.net/​test1 /​mnt/​azuremyresomyvm061717160 -o vers=3.0,​credentials=/​etc/​smbcredentials/​azuremyresomyvm061717160.cred,​dir_mode=0777,​file_mode=0777,​serverino
 +</​code>​
  

rb/linuxloginscripts.1497974900.txt.gz ยท Last modified: 20/06/2017 17:08 by 127.0.0.1