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 \\, 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.
net use
net use /delete \\

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

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

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

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