Different settings under admin account

You want to talk about Far Manager, but don't know where to turn?
chura
Posts: 2
Joined: Wed 21 Nov, 2012 14:19

Different settings under admin account

Post by chura »

Hi all,

Can anyone advise, if it is possible (and how) to configure Far Manager in such way that if it's running under "administrator" account, it has different look?
e.g. to have red panels when running under admin, and common blue when running under default user. I'd like to achieve such behaviour, because i had many accidents regarding this (i once started explorer.exe from the far under admin account, then it was almost impossible to repair all ACLs of mane folders etc). Different color scheme would definitely prevent from such accidents.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Re: Different settings under admin account

Post by DrKnS »

I think this can be implemented with auto-starting lua script which will check `administrator` state and appropriately change palette.
Maybe, some of our lua gurus can provide more information.
User avatar
Centaur
Posts: 1083
Joined: Tue 05 Apr, 2005 20:09
Location: Novosibirsk, Russia
Been thanked: 2 times

Re: Different settings under admin account

Post by Centaur »

If you follow best practices (by having an administrator account separate from your usual user), you have this by default.
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Different settings under admin account

Post by Raistlin »

IMHO the most easy and efficient way is to customize different foreground color of command line text. I don't think red panels are really usable.
Magically yours
Raistlin
2useven10
Posts: 5231
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 315 times

Re: Different settings under admin account

Post by 2useven10 »

F9 -> Options -> Interface settings
[x] Set console icon
[x] Alternate for Administrator
is not enough ?
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Different settings under admin account

Post by Raistlin »

2useven10
Red text in command line is much more noticeable.
Magically yours
Raistlin
chura
Posts: 2
Joined: Wed 21 Nov, 2012 14:19

Re: Different settings under admin account

Post by chura »

Thank you all for the answers/opinions.

- I checked Interface settings, but those checkboxes are not present in my current version (2.0 build 1807 x64) -> maybe it's the right time to play with new 3.0 version :)

- I'm not sure about "best practices", but in win7 is it common to use administrator account and ask for real administrator access when needed

- regarding the particular colors and what to be colored - i would really prefer noticeability more than usability - but also that's why i asked about some "different configuration", so i can customize the look to be noticeable and usable same time, for my particular needs
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Different settings under admin account

Post by Raistlin »

in win7 is it common to use administrator account and ask for real administrator access when needed
It's just a M$ trick for lazy lame users. It's anyway not enough secure in corporate environment, so why don't follow the same account policy everywhere and use separate admin account?
Magically yours
Raistlin
alexmitin
Posts: 50
Joined: Tue 17 Feb, 2009 08:37
Been thanked: 1 time

Re: Different settings under admin account

Post by alexmitin »

chura wrote: - I'm not sure about "best practices", but in win7 is it common to use administrator account and ask for real administrator access when needed

- regarding the particular colors and what to be colored - i would really prefer noticeability more than usability - but also that's why i asked about some "different configuration", so i can customize the look to be noticeable and usable same time, for my particular needs
1) As Centaur suggested, use two DIFFERENT user accounts. One as a regular user account, the other - administrator account. This is the best practice. Windows 7 way to be an admin that is not a real admin unless you say "Run as Admin" is not a good way. Especially when you save files on the network.

FAR 2 keeps all settings in registry. If you use two different accounts, you can customize FAR manager in any way you like. The settings are completely separate.

This is exactly what I am doing with FAR2 on my Windows 7 system.
I am running as a regular user (not an admin in any way). However when I need to do management work, I start FAR manager using "Admin FAR" shortcut, that has a check "Run as administrator" in the shortcut Properties/Advanced section. This prompts to enter the administrator credentials (name and password). So I have two separate admin accounts (one local admin, the other is domain admin) to perform any management work.

For for "Admin FAR" shortcut I changed the default icon (blue) to green. This also visually differentiates it on the task bar.

To enhance this approach, you can create multiple admin and non-admin FAR shortcuts with different icons to indicate different kind of work to do with this FAR manager instance. Also see item 3 below.
-----------

2) As another alternative, use "/u username" parameter when you start FAR. More information - F1, Command line switches.

For example,

Regular FAR shortcut: c:\bin\far2\far.exe
Admin FAR shortcut: c:\bin\far2\far.exe /u TestAdmin

NOTE: TestAdmin in this case is not a real Windows user name but just a name of the FAR profile. It can be any.

Then start FAR using both shortcuts and configure border colors. F9, Options, Colors, Panel, Border.
Press Shift+F9 when you done.

This approach also keeps FAR manager settings in registry, however the registry path is located under the current user profile.
-----------

3) If you have configured "Combine taskbar buttons" on your Windows 7 taskbar (this is default), then you can go even further...

Create a symbolic link (or hardlink) to your far.exe file with different file name in the same directory.

For example, create the a symlink (or hardlink) C:\bin\far2\faradmin.exe for C:\bin\far2\far.exe. Create two shortcuts, one for C:\bin\far2\faradmin.exe and the other for C:\bin\far2\far.exe. When you start multiple FAR copies using diffent shortcuts (that point to different executables), Windows 7 groups them separately on the taskbar. This allows you to separate regular FAR group from Admin FAR group on the task bar.
Last edited by alexmitin on Wed 21 Nov, 2012 21:40, edited 1 time in total.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Re: Different settings under admin account

Post by DrKnS »

Raistlin wrote:why don't follow the same account policy everywhere and use separate admin account?
Because it gives no profit in home environment - you have separated home directory and registry, you need to configure all your programs twice and you must type a password (long and complex, of course) on every step instead of just pressing a button.
alexmitin
Posts: 50
Joined: Tue 17 Feb, 2009 08:37
Been thanked: 1 time

Re: Different settings under admin account

Post by alexmitin »

One more thing I forgot to mention....

Disable these checkboxes in FAR2: (F9, Options, System settings)

Request administrator rights:
[ ] for modifications
[ ] for read
[ ] use additional privileges

This will eliminate some annoying UAC prompts and make your life a little bit easier.

When these checkboxes are disabled, when you run FAR using regular user shortcut you will see the access denied errors if you don't have access to files/directories. This kinda reminds you to use real Admin FAR to access these files.

When you run FAR using Admin FAR shortcut, in most cases you will not see access denied errors (on local system), just because you already have required privileges (i.e. you are using real admin account with elevated privileges when you start Admin FAR). For network access, you may still see access denied errors, when your account does not have rights for the file/folder. Having the above settings checked will not help you in anyway to gain access to these files either.

I prefer to have an access denied warning, instead of UAC prompt, that still fails in the end.
Last edited by alexmitin on Wed 21 Nov, 2012 23:25, edited 2 times in total.
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Different settings under admin account

Post by Raistlin »

DrKnS
Because it gives no profit in home environment
It depends. I have 10 machines (physical and virtual) and configured Windows domain in my home environment - what else do I have to say? :)
you must type a password (long and complex, of course) on every step
Yes. But it could be not so long and complex - why? Besides, it's the best way to remember it.
you have separated home directory and registry, you need to configure all your programs twice
Separated directories - yes, sometimes it makes some inconvenience. But there are ways to eliminate it. And the only program I had to configure twice is... Far of course. What's the reason to run something else under both limited and admin account?
Magically yours
Raistlin
alexmitin
Posts: 50
Joined: Tue 17 Feb, 2009 08:37
Been thanked: 1 time

Re: Different settings under admin account

Post by alexmitin »

DrKnS wrote:
Raistlin wrote:why don't follow the same account policy everywhere and use separate admin account?
Because it gives no profit in home environment - you have separated home directory and registry, you need to configure all your programs twice and you must type a password (long and complex, of course) on every step instead of just pressing a button.
Of course, it has no profit in home environment. Home users are admins and disable UAC. Therefore why bother with this? :)

If you use two different accounts, you don't need to type a password on every step. Just configure FAR as I described above. This prompts you to type the password only once.

Then configure the user menu in the Admin FAR session (that runs as real admin) to start your most useful admin apps. They will be started using real admin credentials without any prompt for the password. To start another copy of Admin FAR - add this command to your FAR user menu.

To start Admin FAR from Regular FAR shotcut add this command to your regular FAR user menu:

Code: Select all

runas /user:AdminUserName c:\bin\far2\adminfar.exe
or probably better:

Code: Select all

start PathTo\AdminFAR.lnk
where, AdminFAR.lnk is configured as I suggested above (icon, run as admin, etc.)
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Different settings under admin account

Post by Raistlin »

Let me add another hint: configure Explorer in admin account as "Launch every window in separate process". It will allow you, for example, to manage or from Far launched under admin account.
Magically yours
Raistlin
alexmitin
Posts: 50
Joined: Tue 17 Feb, 2009 08:37
Been thanked: 1 time

Re: Different settings under admin account

Post by alexmitin »

Raistlin wrote:Let me add another hint: configure Explorer in admin account as "Launch every window in separate process". It will allow you, for example, to manage or from Far launched under admin account.
This does not work in Windows 7 by default, unless...
http://social.technet.microsoft.com/For ... 715e7f641/

NOTE: Make sure you read the whole thread first before you make any changes to registry. Try at your own risk.
Post Reply

Return to “General Discussions”