Tag Info

Hot answers tagged

32

There are actually two parts to your question. Does the superuser account always have uid/gid 0/0 on Linux? Yes. As is pointed out by Rich Homolka in a comment, there's code in the kernel which explicitly checks for uid 0 when needing to check for the root user, which means that root always has at least uid 0. Is the name of the user account with ...


16

This is simple. Just create a new user with it's home directory set to the one you need him to have access to (this command must be run under sudo or in root shell): adduser --home /restricted/directory restricted_user This will create an user restricted_user, the directory /restricted/directory and then permissions on the directory will be set so the ...


16

Actually, you need to use two functions SELECT USER(),CURRENT_USER(); USER() reports how you attempted to authenticate in MySQL CURRENT_USER() reports how you were allowed to authenticate in MySQL Sometimes, they are different


13

Use the sudo command in the script. In the form: sudo -u username command the sudo command runs command as the user username. If the script is being run as root, I don't think it will prompt for a password. Otherwise, this article discusses how to use sudo with password in one command line?, and this article discusses how to use sudo without password?


12

Nevermind, I figured it out. Open a command prompt and type: echo %userdomain% echo %username%


9

Just type "echo %USERNAME%" into command line.


9

It is normal for Mac OS X. It used to be normal on almost all Unix-oid systems. It runs as root without sudo because the ps binary is set-uid to run as root (e.g. on my 10.4 system): % ls -l $(which ps) -rwsr-xr-x 1 root wheel 31932 Mar 20 2005 /bin/ps (the s in place of the the user-owner x column means that it is set-uid (and user-executable), the ...


9

Run the Registry Editor (RegEdit.exe). Navigate to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ CurrentVersion\Winlogon\SpecialAccounts\UserList Select UserList. In the right pane, right click on any blank space, and point to New -> DWORD (32-bit) Value. Name the new DWORD registry value name as the exact same name that ...


9

1) the administrator is always uid == 0. This is coded in the kernel. It would take some coding in the kernel to change this. There's not much point to this, so it's not done. For example, it would be inconsistent for other unixes sharing the same NFS for example. 2) uid 0 does not necessarily map to root. The best example is FreeBSD. It has two uid == 0 ...


9

I'd probably start with reimaging the machine. But if you are determined to figure out the actual cause, swap the hard drive with an identical machine - see if the problem moves with the drive or stays with the hardware. If it moves with the drive, then it's a driver, software or malware issue. Wipe the drive and start over. Or continue fiddling with ...


8

Assuming it's not a boot password: You'll need to physically remove the hard disk and mount the drive in another machine. Edit /etc/sudoers and carefully add your username to the list. (I've done this once after mucking up my only admin account's group memberships but be careful! You're bypassing the normal protections on this file that check to make sure ...


8

You can combine to get domain and user in one call. echo %userdomain% %username%


8

As far as I know, Microsoft Windows desktop OS (XP, Vista, 7) do not allow for multiple simultaneous session. Only Windows Server (with Terminal Server) allows for that. A limited number of remote desktop session are allowed by default with every Windows Server license. On Windows XP their were report of successfully setting it using DLLs from Windows ...


8

First of all, you should understand what your doing: user@PC:~$ cat .ssh/id_rsa.pub | ssh localhost 'cat >> .ssh/authorized_keys' You are copying the public key .ssh/id_rsa.pub through ssh, to the same host (that is what localhost is, the same host). If you replace localhost with some other host, that would make more sense (but if you are trying ...


8

I would not recommend using time a workstation is locked as an indicator of productivity, I personally lock my computer instinctively even if I just get up to stretch or use the bathroom, sometimes if I just want to think hard. Also, just because a computer is not locked or on screen saver doesn't mean the user is doing anything productive. You would be ...


7

You can use: usermod -a -G grouptoadd username Since it is far less obvious than I thought why -a -G is ok while -aG is not I'll try to explain it: The -G options takes either one value or a list of values. In case of one value the value may be given like: -GVALUE since there is no requirement to have a space between the option and the value. This is just ...


7

I assume you are working on Windows-7 and then its much easy to transfer the User profile. Just click on Start button and then type in search box Windows Easy Tranfer and click on it or you can run it as an admin. Now click on Next Now select the third option as you have to take it along with you. Now select the second option after this Windows ...


7

systemd does not allow ordinary users to start system services (except by using SELinux, which Arch does not support). Since rtorrent is not actually a system service, and because you want every user to have their own instance of rtorrent, experiment with systemd's "user" mode. If you start the user@Hans.service system unit, it will launch a separate ...


7

Short answer: "Yes, this is possible". if you like to execute a non-X application then just use the following command: sudo -u abc command If you like to run some X application as another user but with your own desktop first you need to create a helper script, that will make your life simpler create a bin folder under your home directory: mkdir ...


7

A portable solution would be: su abc -c google-chrome However, as google-chrome is requiring X11 access, this will likely fail unless you unsecured it, which would be a very bad idea, especially while running as root. If X11 tunelling/forwarding is allowed, a better way would be ssh -X abc@localhost google-chrome or ssh -Y abc@localhost google-chrome ...


7

You can add or change the wireless password to something more secure, and use a better encryption method, however that wont stop people that know what they are doing. Here is an example of a D-LINK router's MAC address filtering page. http://support.dlink.com/emulators/wbr2310/adv_filters_mac.htm To find your mac address (I'm assuming you are on windows) ...


7

It's possible to run both IPv4 and IPv6 at once, such a configuration is called "dual-stack.". Of course, you will need an IPv6 capable router, so when and if any "killer apps" appear requiring IPv6 only access, you would need to upgrade your router. Because it's possible to run both at once, sites can add IPv6 functionality without affecting IPv4 users at ...


7

As ultrasawblade said, there should be no difference, but there is, at least in the transition period. The main problem are misconfigured DNS servers which may take forever to respond to queries requesting AAAA records for sites which hold the IPv6 addresses. This is the reason why there are so many people who claim that disabling IPv6 will increase web ...


6

You need to remove the "interactive logon" right from the users. You can do this from the "Users and groups" node you get from right clicking on "Computer" in the start menu and choosing "Manage". Unfortunately that too is not included on win7 Home premium or below - to achive the same thing on those editions you need to 1) Download the Windows 2003 ...


6

Create a scheduled task. Go to the control panel and find "Scheduled Tasks", then create a task to run at midnight. You have several options for the action it should take: Just log off - no warning: shutdown.exe -l Force shutdown, but give warning: shutdown.exe -s -t SECONDS_TO_WAIT -c "Bedtime!" Force shutdown, no warning: shutdown.exe -s -t 0 If you ...


6

This answer is good, but the serverfault advice is slightly dangerous - would allow anyone to run anything as root! So I'm posting here because I can't format the comment. I would recommend using visudo to give the permissions you need as precisely as you can. Type visudo and add a line like: username hostname = NOPASSWD: /full/path/to/command1, ...


6

It is a policy that is set on the domain controller. If your system admin has set it then it will only allow logons when connected to the DC. You would need to log on to a local account if this is the case. It all depends on whether the Laptop caches user logon credentials which is set at domain level using a group policy setting. Your best course of ...


6

I would install Windows as normal, and use the features available to move part of the user folders off of the SSD, but not the entire Users folder. Using this technique, I would move the largest folders like Downloads, Documents, Music, Pictures, Videos and Saved Games. That is I would right click on the the folder, click the Location tab, and then use ...


6

is jenkins a service account with no shell configured in /etc/password If that's it try su -s /bin/bash jenkins


5

sudo is essentially the same thing as clicking OK in Windows 7, or Vista's UAC. You are granting yourself on-demand admin. To grant other users access to the folders (edit, create etc) then just give them the level of access you wish them to have, or admin as well. The will have to sudo as well. You can disable sudo, by always running as an elevated user, ...



Only top voted, non community-wiki answers of a minimum length are eligible