Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [uid]

The tag has no usage guidance.

2
votes
1answer
69 views

How essential are usernames ( compared to uids )?

Background: I recently read about a freedesktop.org-bug which allowed executing any systemctl command for uid > INT_MAX. Thus I ran: root@host$> useradd -u 4000000000 largeuiduser root@host$&...
0
votes
0answers
56 views

Is there a recommended way to access files owned by a non-user UID?

Suppose a multiboot computer on which two GNU/Linux distributions are installed, each with its own user(s). Say those users don't share the same UID over the two systems. Now one needs to access the ...
2
votes
1answer
757 views

Assignment of UID and GID from Active Directory

My CentOS 7 machine has successfully joined a domain FOOBAR (as verified by realm list) and here's the information about an user coming from the AD (non-local): [root@centos7 ~]# id jdoe@FOOBAR....
1
vote
1answer
35 views

Mapping user to filesystem user when UID's mismatch?

Say I have a user named user with UID 1001 on one system and the same user (named user) with another UID, let's say 1002. If I unplug the disk drive from the second system and plug it into the first, ...
0
votes
1answer
81 views

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX?

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX ?
5
votes
1answer
163 views

First process in a new Linux user namespace needs to call setuid()?

I'm learning about Linux user namespaces and I'm observing a strange behavior which isn't completely clear to me. I've created a range of UIDs in initial user namespaces to which I can map UIDs in ...
0
votes
3answers
69 views

Shell script example to stop execution of all processes with a certain UID? [duplicate]

I'm new to scripting and I can't seem to find any examples on the internet for this particular task. I'd much appreciate a bit of help.
0
votes
1answer
59 views

How does sudo achieve changing the privileges of a process?

From man sudo When sudo executes a command, the security policy specifies the execution environment for the command. Typically, the real and effective user and group and IDs are set to match ...
0
votes
0answers
323 views

What is the usage of set-user-ID of a program file?

From APUE When we execute a program file, the effective user ID of the process is usually the real user ID. However, we can also set the set-user-ID bit in the file’s mode word (st_mode) that ...
1
vote
1answer
122 views

With set-user-ID bit on, are both the process's EUID and saved set-user-ID changed to the file's user ID?

From APUE The saved set-user-ID is copied from the effective user ID by exec functions. If the file’s set-user-ID bit is set, this copy is saved after exec stores the effective user ID from the file’...
4
votes
2answers
142 views

systemd DynamicUser= services v.s. journald splits

systemd-journald has the default config SplitMode=uid, to create individual journal (log) files for each user, which they are allowed to read. When running services with DynamicUser=, does this mean ...
0
votes
1answer
36 views

uidgid file - UID in parentheses

Looking at file /usr/share/doc/setup-*/uidgid on RHEL7, I can see some lines containing -, ? or number in parentheses: ... nslcd 65 (55) / /sbin/nologin nslcd wine - 66 - - ...
0
votes
1answer
98 views

Can I have two users with the same name but different UID's?

I have a server that I use for playing around with. I want to set up an email account that is @.com, but the way that SquirrelMail and the mail server is set up, the home folder for the username has ...
0
votes
1answer
185 views

Where to obtain the uidgid file

I was reading /etc/bashrc and saw the following: # By default, we want umask to get set. This sets it for non-login shell. # Current threshold for system reserved uid/gids is 200 # You could check ...
0
votes
1answer
599 views

sed to change userid in /etc/passwd to zero

I am trying to change user monitor uid in /etc/passwd , but below gives me an error: sed -s /etc/passwd <<-"EOF" /^\(monitor:[^:]*:\)[0-9]*:[0-9]*:/s//\10:0:/ w q EOF
0
votes
2answers
1k views

Can bash run with uid 0 and different euid?

I was writing some bash code and I wanted to check if the script had root privileges. All of the code I see from other people only checks for $EUID == 0. It is perfectly possible to have other ...
2
votes
1answer
183 views

Mounted SMB shares: permission troubles with UID mismatch between client and server [closed]

On the Linux machine LinuxClient I'm trying to mount an SMB share backups located on the Unix machine Server. I want to provide separate directories within backups for different purposes, and I want ...
1
vote
1answer
200 views

Small office server and UID translation

I want to set up a small server for the office such that users can store their own files which also has separate directories set up for groups to share files. I also have users and clients who would ...
2
votes
1answer
441 views

Reserving a range of anonymous UIDs; /etc/subuid

I need a range of uids (say a few thousand) for a setuid-root tool to use. Is there a protocol to registering such a range or do I just pick a range and hope no other program will use those uids? (I'...
0
votes
1answer
93 views

How to set UIDs and GIDs during install of Debian?

During installation of Debian the default initial UID is 1000 and GID is 1000. When creating a user account during install, is there a way to specify their specific values, for example 3197?
0
votes
1answer
502 views

Directory owner is a number instead of a name in Centos. Why is that?

I am using Centos and I did ll command for one of the directory. Owners of the files within the directory are some numbers instead of username. Can you please explain why is that ? If you see below ...
1
vote
0answers
748 views

Python process can't create a file in a directory, keeps getting `permission denied` IOError

I've a directory mnt with 777 permissions: drwxrwxrwx 2 root root 14336 Feb 5 15:52 mnt I've created a bunch of users in the group root from uid to 5204 to 5250. I've a python script that ...
3
votes
1answer
9k views

Fix Nvidia drivers in Ubuntu 16.04 when getting the “Stopping User Manager for UID 121” error

UPDATE:This is a re-posting... So, because this was not a explicitly a question, it was deemed useless and unworthy of being posted by the StackExchange gods, (I think I forgot to sacrifice an Apple ...
3
votes
1answer
165 views

suid executibles work only when present in the system PATH

I have an executible which requires root privilages. But it seems to work only when it's present in the system path. When I execute it like this: $ ./prog The program complains of having no root ...
0
votes
1answer
25 views

Is restricting permissions based on linux usernames instead of uid a secure method?

Say you have a user called foo and a group called foogroup. The uid for foo is 10000 and gid for foogroup is 20000. If your program wants to restrict specific users, is checking the user name as ...
1
vote
2answers
4k views

How could one determine UID/GID of running process

Is there any way to retrieve UID/GID of running process? Currently, I know only way of looking it up in htop. But I don't want to depend on third-party tool, prefer to use builtin unix commands. ...
0
votes
1answer
844 views

Does `sudo` work in terms of changing the effective user and group IDs of a process?

Does sudo give the root's power to a command by changing the effective user and group IDs of the process of the command to be root? If not, how does sudo work to accomplish that?
1
vote
2answers
227 views

How can we set firewall rules to allow or deny specific programs?

This tutorial shows how to set up an easy parental control facility, with help of DansGuardian, Privoxy and a few firewall rules. I've tested it and so far, it seems to be working for most part. ...
0
votes
0answers
127 views

Why is my apache running in 8080 started by root?

I am running Apache in 8080 port. After starting the httpd, I noticed that the parent process is owned by root. [root@a ~]# ps -ef | grep httpd root 13480 1 0 08:07 ? 00:00:00 /usr/...
0
votes
2answers
757 views

Bash - How to shorten username in PS1

Currently my prompt is: xiaobai@dnxb:/tmp$ root@dnxb:/tmp# My desired prompt: xb@dnxb:/tmp$ rt@dnxb:/tmp# My idea is alias of username, so i tried reuse the same uid to create a new user: ...
0
votes
1answer
44 views

Attack scenario if files in /bin/ or /sbin/ owned by normal user but not invoked by sudo?

I've learnt the following symlink is insecure because sometime i use vim to edit file by sudo: xiaobai@dnxb:/tmp$ sudo find -L /root \! -user root /root/.vimrc xiaobai@dnxb:/tmp$ ls -lathi /root/....
3
votes
1answer
931 views

Uid/Gid privileged LXC container : systemd lxc-start failed on ubuntu 16.04

I would like to create & start LXC container for specific UID & GID for below purpose. Login to root user(sudo user) , Do lxc-create of container, then do lxc-start of the container with same ...
1
vote
1answer
751 views

Upper limit on UIDs and GIDs in AIX

What is the upper limit on the UIDs and GIDs in AIX?
1
vote
0answers
35 views

Long UIDs create issues with some UNIX commands

We have users with long UIDs from Active Directory. I just noticed today that a 'ps aux' shows the UID and not the user name. Likewise, 'who' does not see the users at all. On the other hand, an "...
0
votes
1answer
1k views

User with UID 0 problem

I am running into an issue with Redhat 6.7. We installed a piece of software that created a user admin with uid of 0. This is a turnkey install of the software so I am really unable to change the uid. ...
3
votes
1answer
1k views

How to change Squid service UID in FreeBSD?

Strangely enough, it appears that Squid cannot start if the squid user is not affected to the UID 100. When trying to use another PID, the service systematically fails to start with the following ...
1
vote
1answer
2k views

User ID in kernel module [closed]

I'm trying to intercept the clone system call so that I could print user ID and process ID before the actual system call executes. I am using get_user_id()->uid to access user ID in kernel module ...
5
votes
2answers
2k views

Proper syntax for “id -r” command

I'm trying to see if id -r will print out the UID or username of the user who logged into the system despite any su's or sudo's. I'm interested in doing this so I can keep people a little more ...