Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Force Wallpapers using Samba

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
InAt!QuE
Apprentice
Apprentice
User avatar
Posts: 257
Joined: Fri Jan 02, 2004 12:02 am
Location: The Netherlands

Force Wallpapers using Samba

  • Quote

Post by InAt!QuE » Wed Feb 13, 2008 11:01 am

Hi All,

I have a Samba PDC and I want all workstations (XP Pro & W2K Pro) to use the same wallpaper.
Is there a way in Samba to force the clients to use a specific wallpaper?

Or do I have to use the logon script for this?
...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly).
Top
nobspangle
Veteran
Veteran
User avatar
Posts: 1318
Joined: Tue Mar 23, 2004 12:12 pm
Location: Manchester, UK

  • Quote

Post by nobspangle » Wed Feb 13, 2008 11:08 pm

I think Windows system policy will allow you to stop people from changing the wallpaper but I don't think you can force a particular wallpaper. Sounds like a logon script may be your best bet.
Top
daschapa
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 80
Joined: Fri Sep 01, 2006 7:32 pm

  • Quote

Post by daschapa » Thu Feb 14, 2008 12:31 am

I think SMB is more like something like NFS and CUPS together (note that it is not really an implementation of both, but a completely different protocol).
To force a wallpaper yo can make a script which runs every 1 minute (a half of the average windows bootup time, LOL) and detects a host when it connects to samba network, then rub a ssh script to fix its wallpaper.
======================
Top
tomushu
n00b
n00b
Posts: 1
Joined: Thu Feb 14, 2008 10:15 am

  • Quote

Post by tomushu » Thu Feb 14, 2008 10:53 am

I'm using this configuration to force wallpaper on users profiles.
smb.conf.

Code: Select all

        logon script = logon.bat
[netlogon]
        path = /home/netlogon/
        browseable = No
        read only    = yes
In /home/netlogon directory i'm having this scripts:
logon.bat

Code: Select all

\\ip_address_of_pdc\netlogon\wall.vbs
In the wall.vbs i have this code:

Code: Select all

' Create the variables needed

Dim WSHShell
Dim strRegKey
Dim strWallpaper
Dim strDesktop
Set shell = CreateObject("WScript.Shell")
Set env = shell.Environment("process")
userpath = env("USERPROFILE")
' msgbox userpath



' Create the Wscript Shell object
Set WSHShell = WScript.CreateObject("WScript.Shell")

' Define the wallpaper
strWallpaper = userpath & "\wall.bmp"
strDesktop    = WSHShell.SpecialFolders("Desktop")

' Create the wallpaper key
'strRegKey =  "HKEY_CURRENT_USER\"
'strRegKey = strRegKey & "Software\"
'strRegKey = strRegKey & "Microsoft\"
'strRegKey = strRegKey & "Internet Explorer\"
'strRegKey = strRegKey & "Desktop\"
'strRegKey = strRegKey & "General\"
'strRegKey = strRegKey & "Wallpaper"
strRegKey = "HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper"
' msgbox strRegKey
' msgbox strWallpaper

' Write the key, type, and value
WSHShell.RegWrite strRegKey, strWallpaper, "REG_EXPAND_SZ"

' Refresh the desktop now.
WSHShell.AppActivate strDesktop
WSHShell.SendKeys "{F5}"

'Quit
Wscript.quit(0)
This should be all that u need for u to set the wallpaper on your profile users.

Good luck
Top
InAt!QuE
Apprentice
Apprentice
User avatar
Posts: 257
Joined: Fri Jan 02, 2004 12:02 am
Location: The Netherlands

  • Quote

Post by InAt!QuE » Thu Feb 14, 2008 8:05 pm

Where do I have to put the wallpaper?

I already tried it with a logon script;

Code: Select all

:: Configure Wallpaper 
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "%SystemRoot%\wallpaper.bmp"
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 0
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 2
:: Configure the screen saver.
REG ADD "HKCU\Control Panel\Desktop" /V SCRNSAVE.EXE /T REG_SZ /F /D "%SystemRoot%\System32\scrnsave.scr"
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaveActive /T REG_SZ /F /D 1
:: Set the time out to 900 seconds (15 minutes).
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaveTimeOut /T REG_SZ /F /D 900
:: Set the On resume, password protect box 
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaverIsSecure /T REG_SZ /F /D 1
:: Remove the user's ability to see the Screen Saver, background, and appearance tabs of Display Properties. 
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispScrSavPage /T REG_DWORD /F /D 1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispBackgroundPage /T REG_DWORD /F /D 1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispAppearancePage /T REG_DWORD /F /D 1
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
But as you see, like here I was not sure where to copy so I tried at the workstation in the windows folder. ("%SystemRoot%\wallpaper.bmp")
This worked but I don't want to copy the wallpaper to all workstations. This is a lot of work. I geuss it should be easier.
So I tried to copy the wallpaper.bmp to the netlogon directory.
I changed the first line at the script to;

Code: Select all

REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D [b]"wallpaper.bmp"[/b]
And it worked but there is one problem.
It works well if you wallpaper.bmp is at a size of +/- <1,3mb
After I made a new wallpaper.bmp it had a size of 3mb and after logged into the workstation I got a white screen.
I geuss this is again some weird M$ peeps!

But will the vbs script cover this??
...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly).
Top
Post Reply

5 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic