user join to a new group and effect right now without logout

user join to a new group and effect right now without logout

If you modified your own user account while logged in with it, the changes will not have an effect until you next login.

If you don’t want to logout, you can replace your current BASH shell with a new one to achieve the same thing by running the follow:

# su -m -c “$(which $SHELL) –login -i" $(whoami)

This will switch-user to yourself, replacing your current shell with a new instance of itself. You will be prompted for your password.

If you don’t specify a command to run you’ll probably get an error to the effect of “cannot execute bash: file not found” because it won’t be on the environment. You could use –shell to point su at it, but your shell wouldn’t be a “login” shell and therefore won’t read your .bash_profile etc.

廣告

如何刪除 windows 網路芳鄰登入的帳號密碼 Cache

Clear Windows Samba Login Password

If you connect for example on Linux Samba server, for example \\192.168.2.1, and use for first shared folder one user and pass, and after that you try to login to second folder with another user and pass, Windows can’t login.

The only way to login ( I found ) is to delete share, to clear window’s share cache. Open cmd, and type the following
command net use to list connection status and use net use /delete to delete the connection.
command:
net use
net use /delete \\192.168.2.1

如果路徑 中包含了中文字或是空白字元可以將路徑用雙引號括起來
例如:建立連線 net use “//192.168.128.245/User 共用區"
建立網路磁碟機 net use P: ”//192.168.128.245/User 共用區"

刪除連線 若已建立為網路磁碟機該用磁碟機代號來刪除連線:net use /delete P: ,否則會出現找不到路徑的錯誤。

沒建立網路磁碟者直接指定路徑來刪除: net use /delete “//192.168.128.245/User 共用區"

frameset’s frame page do logout then redirect top’s url to login page

在網頁的框架中如何在任一個頁面做登出的動作,然後將整個框架重新導向登人頁

在做登出的動作像是將cookie或是session這些可以記錄登入資訊的物件給消除掉,然後在把整個框架頁導向登出後,使用者因該去的頁面。
繼續閱讀