Skip to main content

New answers tagged

0 votes

How to switch between users on one terminal?

Plenty of answers and all excellent but for such a brief question I need to assume an XY might be in place. Thus this post. Use VTs. Advantages include kernel implemented so fewer attack vectors you ...
Vorac's user avatar
  • 3,115
0 votes

How to check if a user can access a given file?

To check for a specific user, you can try the below. sudo -u username namei path /long/path/to/file.txt It will give you output as below if the user has access to the file. f: /long/path/to/file.txt ...
rainu's user avatar
  • 101
0 votes

When to useradd

You can look at /etc/passwd to see if the user exists: grep --quiet '^testuser:` /etc/passwd if [ $? -ne 0 ]; then useradd -r testuser fi If testuser exists on a system, their userid is the first ...
waltinator's user avatar
  • 5,239
0 votes

When to useradd

You could just simply make an if statement : if the user exists already, you pass else you create it. Also, i don't see why you would create the same user for multiple modules. Every install as you ...
Rouuufa's user avatar
  • 64
2 votes

How to effectively alias a user on linux

I too, hate typing. Better to (lets say target ssh server is host "nixsrv1" and jbro user is host "laptop2") From laptop2: vim ~/.ssh/config (edit %userprofile%.ssh\config if ...
Mike Steele's user avatar
-1 votes

Running chsh does not change shell

Circling back on this if anyone wants a simple solution: I was logged in as root and I got the same error message as was listed before using chsh. This is what worked for me. If I wanted to toggle to ...
Charles Owen's user avatar

Top 50 recent answers are included